15 步:好的,我们可以猜出重复的字母,但游戏应该同时显示所有正确的字母!

当您不知道循环应该运行多少次时, while循环很有用。

  • While In拖到if语句中的.say()下方(缩进两次!)。
  • letter_guess my_var my_list更改为word_list
  • 现在,缩进if语句中的所有其他代码行,以便它们也在while循环中(4 行代码!)。

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)