Commit 71405a1b by BellCodeEditor

save project

parent fa476cc9
Showing with 11 additions and 11 deletions
......@@ -4,13 +4,14 @@ print("玩家出拳"+player)
o=["石头","剪刀","布"]
p=random.choice(o)
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
if player in o:
if player==p:
print("平了")
elif player=="石头"and p=="剪刀":
print("赢了")
elif player=="剪刀"and p=="布":
print("赢了")
elif player=="布"and p=="石头":
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