Commit 8deea8b4 by BellCodeEditor

save project

parent 3751c30d
Showing with 7 additions and 0 deletions
...@@ -4,3 +4,9 @@ import random ...@@ -4,3 +4,9 @@ import random
i=["石头","剪刀","布"] i=["石头","剪刀","布"]
e=random.choice(i) e=random.choice(i)
print(e) print(e)
if a==e:
print("平局")
elif (a=="石头" and e=="剪刀") or (a=="剪刀" and e=="布") or (a=="布" and e=="石头"):
print("你赢了!")
else:
print("你输了!")
\ No newline at end of file
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