Commit 44ca1c05 by BellCodeEditor

save project

parent c067f86c
Showing with 8 additions and 7 deletions
......@@ -4,18 +4,19 @@ import random
ABC=["石头","剪刀","布"]
wc=random.choice(ABC)
print("电脑出的:"+wc)
if zmn==wc:
if zmn in wc:
if zmn==wc:
print("平局")
elif zmn=="石头" and wc=="剪刀":
elif zmn=="石头" and wc=="剪刀":
print("你赢了")
elif zmn=="剪刀" and wc=="布":
elif zmn=="剪刀" and wc=="布":
print("你赢了")
elif zmn=="布" and wc=="石头":
elif zmn=="布" and wc=="石头":
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