Let's add a point to the scoreboard and reset the ball after the user makes a basket.

  • Inside the if statement, add a 0.5 second Wait command.
  • Use Go To to return the ball to a random position, using (x, -25).
  • Reset the counts with TWO Integer Variable, named left_count and down_count. Set them both to 0.
  • Use Add Value to increase the score by 1, and use Update Display to show the new score.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)