STEP 4: Let's also use a random integer as a y-coordinate and then set up a sprite that will appear at that location!

  • From , drop another Random Integer indented inside the loop.
  • Name the random integer rand_y and give it a range of (-200, 200).
  • In GRAPHICS, go to and drop Sprite at Position indented inside the loop.
  • Rename the sprite astro. Why does only one sprite seem to appear ? Click Next to fix this!

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)