STEP 8: Our ice cream shop can't sell negative scoops. Let's serve at least one scoop if they entered zero or fewer.

elif means "else if" and creates another condition that must be checked if the first one failed.

  • Go to and drag elif underneath the if statement inside the try block. Indent it three times!
  • From drag Integer Variable inside the elif block.
  • Change the name of the variable from my_var to scoops and change the value from 25 to 1.

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)