Commit 4be5c27e by BellCodeEditor

save project

parent c70ba1b5
Showing with 13 additions and 9 deletions
...@@ -6,13 +6,17 @@ while True: ...@@ -6,13 +6,17 @@ while True:
print("玩家:"+a) print("玩家:"+a)
c=random.choice(b) c=random.choice(b)
print("电脑:"+c) print("电脑:"+c)
if a==b: if a=="石头" or a=="剪刀" or a=="布":
print("平局") if a==b:
elif a=="剪刀" and b=="布": print("平局")
print("你赢了") elif a=="剪刀" and b=="布":
elif a=="布" and b=="石头": print("你赢了")
print("你赢了") elif a=="布" and b=="石头":
elif a=="石头" and b=="剪刀": print("你赢了")
print("你赢了") elif a=="石头" and b=="剪刀":
print("你赢了")
else:
print("你输了")
else: else:
print("你输了") print("输错了")
a=input("请输入(石头/剪刀/布)")
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