STEP 7: If the user's input is greater than or equal to four, we should set the user's scoops to three, regardless.

  • Inside your if statement, change the name of the integer variable from my_var to scoops.
  • Then, change the integer value from 25 to 3.
  • Nice! Now if the user requests more than three scoops, the user only gets three. (No greedy customers!)

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)