STEP 7:如果用户的输入大于或等于四,我们应该将用户的勺子设置为三,不管怎样。

  • 在 if 语句中,将整数变量的名称从scoops更改为my_var
  • 然后,将整数值从25更改为3
  • 好的!现在,如果用户请求超过三个勺子,则用户只能得到三个。 (没有贪婪的客户!)

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
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)