Commit 57740968 by BellCodeEditor

save project

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