STEP 13: Let's add the value of our two rolls together to get a total.

We'll use a variable named total_roll to store the sum, or total, of our two rolls.

  • In LOGIC, go to and drag Integer Variable to the bottom of your program.
  • Change the variable name from my_var to total_roll. The variable name is the word before the = sign.
  • Change the value of total_roll from 25 to roll1 + roll2. The variable value comes after the = sign.

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)