现在,如果玩家猜到正确的代码,我们要停止循环来完成游戏。

  • 使用另一个 Return Variable 来调用函数 analyze_code
  • 将返回变量命名为 status 并使用参数:guesscodey
  • 如果 status"true!" ,则使用 if 语句来 Break 循环。
  • 在循环内部和 if 语句外部,当每次循环运行时,使用 Add Valuey 添加 35

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)