第 9 步:是时候让用户猜密码了!

  • 拖出Ask并将其放入for循环中。
  • 将输入变量名称从choice更改为guess
  • .ask()中的字符串更改为"What do you think my word is?" .

通过将.ask()放在循环中,我们要求用户对password中的每个字母猜测一次!

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)