第7步:用户有三次猜测机会,这意味着在 for 循环中需要一个 ask 指令。

  • .say() 中的字符串更改为 "Time to guess!"
  • 点击 ,将 Ask for Integer 拖动到 for 循环内部。它的前方应当有一个 ····
  • .ask() 前面的名称更改为 computer
  • .ask() 中的字符串更改为 "What do you think my number is?"

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)