第 4 步: Ed 想知道我们想要多少勺,所以我们需要确保用户输入的是实际数字。

  • 在逻辑去并将While True拖到main()的底部。
  • 并将Try Except拖到循环中。确保它缩进两次
  • 点击运行,回答问题,并检查控制台输出。

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)