Commit 861dd83e by BellCodeEditor

save project

parent af0657b8
Showing with 12 additions and 2 deletions
...@@ -3,4 +3,14 @@ player=input("请出拳:石头/剪刀/布") ...@@ -3,4 +3,14 @@ player=input("请出拳:石头/剪刀/布")
print("玩家出拳"+player) print("玩家出拳"+player)
o=["石头","剪刀","布"] o=["石头","剪刀","布"]
p=random.choice(o) p=random.choice(o)
print(p) print(p)
\ No newline at end of file if player==p:
print("平了")
elif player=="石头"and p=="剪刀":
print("赢了")
elif player=="剪刀"and p=="布":
print("赢了")
elif player=="布"and p=="石头":
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