Commit 71405a1b by BellCodeEditor

save project

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