Commit 44ca1c05 by BellCodeEditor

save project

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