Commit ce988ca7 by BellCodeEditor

save project

parent 58d4a2ae
Showing with 22 additions and 1 deletions
...@@ -4,6 +4,27 @@ SB=input("玩家请出拳") ...@@ -4,6 +4,27 @@ SB=input("玩家请出拳")
print("玩家出了"+SB) print("玩家出了"+SB)
pp=["石头","剪刀","布"] pp=["石头","剪刀","布"]
a=random.choice(pp) a=random.choice(pp)
print("机器人出了什么拳"+a) print("机器人出了什么"+a)
if SB==a:
print("平局")
elif SB=="剪刀"and a=="布" or SB=="石头" and a=="剪刀" or SB=='布'and a=="剪刀":
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