17 步:让我们看看用户回答了什么,如果用户想要的话,添加软糖。

  • 单击逻辑并转到.将if拖到 elif 语句的底部。
  • if 语句应该缩进两次!将choice更改为fudge
  • 并在 if 语句中拖动Function Call with Parameter 。缩进3次!
  • 将函数重命名为add_fudge()并将参数更改为scoops

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)