第 13 步:让我们完成游戏中的最后三个组合!

  • 再加上if and 3次。在每个 if 语句测试中,如果玩家选择"scissors" ,而计算机选择"rock""paper""scissors"
  • 在每个 if 语句下添加缩进的Set Text 。将每个字符串中的字符串更改为"Computer wins!" , "Player wins!""Tie game!"取决于谁赢了。

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)