STEP 12: We'll set up the random number we generated to pick rock, paper, or scissors for the computer.

This test statement will tell the computer to choose "rock" if the random number generated is 1.

  • Go to and drag an if block into the bottom of your program.
  • Change the test variable in the if statement to random_choice. Change the test value to 1.
  • Drag a Rock sprite to the INSIDE of the If Statement you just made.

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)