第10 步:让我们告诉玩家,如果他们选择"paper"而计算机选择"rock" ,他们就赢了。
使用其他 if 语句作为指导来帮助您编写这些语句。更改 if 语句中的名称和值。
- 添加一个if and语句来测试choice是否等于"paper"和computer_choice是否等于"rock" 。
- 拖出Set Text 。通过更改变量名称将命令分配给result文本。
- 将.set_text()中的字符串更改为"Player wins!"因为纸胜过岩石。
To navigate the page using the TAB key, first press ESC to exit the code editor.