Commit 51f75280 by BellCodeEditor

auto save

parent 35d960f2
Showing with 9 additions and 6 deletions
...@@ -5,9 +5,12 @@ while True: ...@@ -5,9 +5,12 @@ while True:
x=["石头","剪刀","布"] x=["石头","剪刀","布"]
c=random.choice(x) c=random.choice(x)
print(c) print(c)
if b==c: if b in list:
print("平局") if b==c:
elif (b=="石头" and c=="剪刀") or (b=="剪刀" and c=="布") or (b=="布" and c=="石头"): print("平局")
print("你赢了") elif (b=="石头" and c=="剪刀") or (b=="剪刀" and c=="布") or (b=="布" and c=="石头"):
print("你赢了")
else:
print("你输了")
else: else:
print("你输了") print("输入错误")
\ No newline at end of file \ 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