DEMO #1: In this demo, the program will create a random number and use it as an argument in a command!

A variable is a name that stores a value. So far, you've used variables to store sprites, strings, and integers. In this lesson, you'll use a variable to store a random number.

Variables can be used to store values that change or values that we don't know in advance.

  • Click Run to see the demo. Try running the demo more then once. You spin a different amount each time!

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)