Commit 1fbdd590 by BellCodeEditor

save project

parent 36296bd1
Showing with 13 additions and 11 deletions
...@@ -4,18 +4,20 @@ print("玩家出拳:"+player) ...@@ -4,18 +4,20 @@ print("玩家出拳:"+player)
a=["石头","剪刀","布"] a=["石头","剪刀","布"]
b=random.choice(a) b=random.choice(a)
print(b) print(b)
if a==b: if player in a:
print("你平局了") if a==b:
elif a=="石头" and b=="剪刀": print("你平局了")
print("你赢了") elif a=="石头" and b=="剪刀":
elif a=="布" and b=="石头": print("你赢了")
print("你赢了") elif a=="布" and b=="石头":
elif a=="剪刀" and b=="布": print("你赢了")
print("你赢了") elif a=="剪刀" and b=="布":
else: print("你赢了")
print("你输了") else:
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