第8步:是时候创建下一个 if 语句了。记住,条件语句在LOGIC选项卡中。

  • 点击 ,并将 If 拖动到程序底端的第一个 if 语句外部。
  • 将测试行中的变量更改为 rand_answer。将测试值更改为 2
  • 点击 ,并将 Say 拖动到第二个 if 语句内部。
  • .say() 前面的名称更改为 tim

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)