Commit 040cb21b by BellCodeEditor

save project

parent 2080426e
Showing with 3 additions and 1 deletions
...@@ -6,7 +6,9 @@ cp = random.choice(list) ...@@ -6,7 +6,9 @@ cp = random.choice(list)
print("电脑出拳:"+cp) print("电脑出拳:"+cp)
if player==cp: if player==cp:
print("平局") print("平局")
elif player=="石头" and cp=="剪刀" or player=="剪刀" and cp=="布" or player=="布" and cp=="石头" elif player=="石头" and cp=="剪刀" or player=="剪刀" and cp=="布" or player=="布" and cp=="石头"tt
print("玩家获胜") print("玩家获胜")
else: else:
print("电脑获胜") print("电脑获胜")
else:
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