Commit 055fa028 by BellCodeEditor

save project

parent 49e1b850
Showing with 9 additions and 0 deletions
...@@ -4,3 +4,11 @@ list01 = ["剪刀","石头","布"] ...@@ -4,3 +4,11 @@ list01 = ["剪刀","石头","布"]
player_01 = random.choice(list01) player_01 = random.choice(list01)
print("玩家出拳为:"+player) print("玩家出拳为:"+player)
print("机器人出拳为:"+player_01) print("机器人出拳为:"+player_01)
if player == player_01:
print("平局")
elif player == "剪刀" && player_01 == "石头" ||
player == "石头" && player_01 =="布" ||
player == "布" && player_01 == "剪刀":
print("机器人胜利")
else:
print("玩家胜利")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment