第 3 步:我们可以使用 Python 关键字and同时测试两件事: choice and computer_choice

  • 在 LOGIC 中,转到并拖出if and .将其放在程序的底部。
  • 将第一个测试变量更改为choice ,将第二个测试变量更改为computer_choice
  • 在图形中,转到并拖出Set Text 。将其缩进 if-and 语句中。
  • .set_text()命令前面的变量名从sprite更改为result

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)