STEP 10: Let's make our UFOs move along the x-axis at random speeds.

  • Go to and drop Random Integer indented inside the for loop.
  • Change the variable's name from my_var to rand_speed.
  • Change the range so that it creates a random number from (-2, 2).
  • In GRAPHICS, use Set x Speed in the loop to set the ufo's speed to rand_speed.

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)