Commit 5043019f by BellCodeEditor

save project

parent ac48b342
Showing with 14 additions and 10 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:
print("平局") if a==d:
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("你输了") elif d=="布"and a=="石头":
else : print("你输了")
print("你赢了") else :
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