Commit e4a52fc0 by BellCodeEditor

auto save

parent fe4bf34a
Showing with 6 additions and 3 deletions
......@@ -3,9 +3,12 @@ wj=input("我出拳:")
cq=["剪刀","石头","布"]
computer=random.choice(cq)
print(computer)
if wj==computer:
if wj in cq:
if wj==computer:
print("平局")
elif (wj=="剪刀" and computer=="布") or (wj=="布" and computer=="石头") or (wj=="石头" and computer=="剪刀"):
elif (wj=="剪刀" and computer=="布") or (wj=="布" and computer=="石头") or (wj=="石头" and computer=="剪刀"):
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