Commit 770c08ff by BellCodeEditor

save project

parent db2f224a
Showing with 7 additions and 7 deletions
......@@ -4,13 +4,13 @@ print("玩家选择"+p)
a=["石头","剪刀","布"]
n=random.choice(a)
print("电脑选择"+n)
if p==n:
if p in a :
if p==n:
print("平局")
elif p=="石头" and n=="剪刀":
elif (p=="石头" and n=="剪刀")or(p=="布" and n=="石头")or(p=="剪刀" and n=="布"):
print("你赢了")
elif p=="剪刀" and n=="布":
print("你赢了")
elif p=="布" and n=="石头":
print("你赢了")
else:
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