STEP 1: Let's start by generating a random number! We have created a sprite for you.

  • In the LOGIC tab, go to and drag Random Integer into the editor.
  • In the GRAPHICS tab, go to and drag in Say.
  • Replace the string "I am a sprite." with my_var.

Notice that every time you click Run, the sprite says a random number between 1 and 10!

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)