第 6 步:让我们创建一个列表来存储用户的答案。

我们暂时将这个列表留空,因为我们会在遍历问题列表时为其附加值

  • ,将Empty List拖入程序底部。
  • 将列表的变量名称更改为user_choices

之后,每次用户输入 a、b、c 或 d 时,该字母都会添加到此列表中!

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)