STEP 4: Now that we have our x-coordinate, we need our y-coordinate.

  • From , drag in Random Integer again.
  • Adjust the range of possible random numbers by changing 1 to -250 and 10 to -150.
  • Rename the variable from my_var to y.

Note: The range for the y-coordinate is different because we don't want buildings in the sky!

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)