Commit 8a63c45c by BellCodeEditor

save project

parent 0e2eaf1c
Showing with 12 additions and 10 deletions
...@@ -5,17 +5,19 @@ list=["石头","剪刀","布"] ...@@ -5,17 +5,19 @@ list=["石头","剪刀","布"]
computer = random.choice(list) computer = random.choice(list)
print("布尔什维克出拳:"+player) print("布尔什维克出拳:"+player)
print("资本家出拳:"+computer) print("资本家出拳:"+computer)
if player == computer: if player in list:
print("平局") if player == computer:
elif player=="石头" and computer=="布": print("平局")
print("很遗憾,同志,这场革命我们没赢") elif player=="石头" and computer=="布":
elif player=="剪刀" and computer=="石头": print("很遗憾,同志,这场革命我们没赢")
print("很遗憾,同志,这场革命我们没赢") elif player=="剪刀" and computer=="石头":
elif player=="布" and computer=="剪刀": print("很遗憾,同志,这场革命我们没赢")
print("很遗憾,同志,这场革命我们没赢") elif player=="布" and computer=="剪刀":
print("很遗憾,同志,这场革命我们没赢")
else:
print("同志,我们赢得了革命!!!")
else: else:
print("同志,我们赢得了革命!!!") print("同志,我们在革命,别开玩笑啦!")
......
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