STEP 2: Let's change the range of numbers so we always get a value that could appear on a number cube!

The two arguments in .randint() show the range. The first number is the lowest possible value and the second is the highest possible value. The program will randomly select a number between the two values (including the two values themselves).

  • Change the second integer in .randint() from 10 to 6.

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)