Commit 861dd83e by BellCodeEditor

save project

parent af0657b8
Showing with 11 additions and 0 deletions
...@@ -4,3 +4,13 @@ print("玩家出拳"+player) ...@@ -4,3 +4,13 @@ print("玩家出拳"+player)
o=["石头","剪刀","布"] o=["石头","剪刀","布"]
p=random.choice(o) p=random.choice(o)
print(p) print(p)
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