Commit 5043019f by BellCodeEditor

save project

parent ac48b342
Showing with 9 additions and 5 deletions
...@@ -4,13 +4,16 @@ d=random.choice(w) ...@@ -4,13 +4,16 @@ d=random.choice(w)
a=input("请出拳(石头/剪刀/布):") a=input("请出拳(石头/剪刀/布):")
print("请玩家出拳"+a) print("请玩家出拳"+a)
print(d) print(d)
if a==d: if a in w:
if a==d:
print("平局") print("平局")
elif d=="石头"and a=="剪刀": elif d=="石头"and a=="剪刀":
print("你输了") print("你输了")
elif d=="剪刀"and a=="布": elif d=="剪刀"and a=="布":
print("你输了") print("你输了")
elif d=="布"and a=="石头": elif d=="布"and a=="石头":
print("你输了") print("你输了")
else : else :
print("你赢了") print("你赢了")
else:
print("输入错误!")
\ No newline at end of file
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