Commit 4be5c27e by BellCodeEditor

save project

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