STEP 9: Now we need to set the value range for roll2.

The arguments in randint set the range. Since dice have 6 sides we want a random number between 1 and 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)