Commit 6944684f by BellCodeEditor

save project

parent 66500d88
Showing with 7 additions and 7 deletions
...@@ -4,10 +4,10 @@ import random ...@@ -4,10 +4,10 @@ import random
q=["石头","剪刀","布"] q=["石头","剪刀","布"]
z=random.choice(q) z=random.choice(q)
print("计算机"+z) print("计算机"+z)
if a in q:
if a==z: if a==z:
print("平局") print("平局")
elif ( a == "石头" and z == "剪刀" ) or ( a == "剪刀" and z== "布") or ( a == "布" and z=="石头"): elif ( a == "石头" and z == "剪刀" ) or ( a == "剪刀" and z== "布") or ( a == "布" and z=="石头"):
print("你赢了") 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