Commit df56cb14 by BellCodeEditor

save project

parent 90bd5621
Showing with 12 additions and 3 deletions
import random import random
w=["石头","剪刀","布"] w=["石头","剪刀","布"]
d=random.choice(w) d=random.choice(w)
player=input("请出拳(石头/剪刀/布):") a=input("请出拳(石头/剪刀/布):")
print("请玩家出拳"+player) print("请玩家出拳"+a)
print(d) print(d)
if a==d:
print("平局")
elif d=="石头"and a=="剪刀":
print("你输了")
elif d=="剪刀"and a=="布":
print("你输了")
elif d=="布"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