Let's add our basketball and have it start at a random position on the stage for the tip off!

  • Go to and drag out Basketball. Name it ball.
  • Got to and create a Random Integer named x with a range between -100 and 150.
  • Use a new Go To command to place the ball at (x, -25).

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)