第3步:让我们看看如果用户出石头会发生什么。

记住,任何 if 语句内部的代码前面必须以黄色区块 ···· 缩进。

  • 在 LOGIC 中,点击 ,并将 if 拖动到代码底部。
  • 将测试值更改为"rock"
  • 点击 ,并将 Rock 拖动到 if 语句中。

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)