第 8 步:每次循环运行时,我们都需要它向用户提出问题,等待,然后存储用户的选择。

  • .ask()中的参数从"Yes or no?"到变量question
  • ,拖出Append INSIDE循环。
  • .append()之前的列表名称更改为user_choices并将变量更改为choice

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)