STEP 9: Let's update the condition in the elif statement to make sure the user can't request less than one scoop!

We can use <= in an if statement to see whether a value is less than or equal to another value.

  • In the elif statement, change the variable choice to scoops.
  • Now change the == operator to <= which means less than or equal to.
  • Great! Lastly, change "no" to the integer 0. Now if the user orders zero or fewer scoops, they will still get one!

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)