Commit 57740968 by BellCodeEditor

save project

parent 1f79e2da
Showing with 8 additions and 2 deletions
...@@ -3,4 +3,11 @@ print("你出了"+a) ...@@ -3,4 +3,11 @@ print("你出了"+a)
import random import random
q=["石头","剪刀","布"] q=["石头","剪刀","布"]
z=random.choice(q) z=random.choice(q)
print("计算机"+z) print("计算机"+z)
\ No newline at end of file
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