Commit e3aa3cb8 by BellCodeEditor

save project

parent 1ff09952
Showing with 9 additions and 1 deletions
...@@ -2,4 +2,11 @@ import random ...@@ -2,4 +2,11 @@ import random
name=input("请出拳(拳头/剪刀/布)") name=input("请出拳(拳头/剪刀/布)")
print(name) print(name)
a=["拳头","剪刀", "布"] a=["拳头","剪刀", "布"]
random.choice(a) b=random.choice(a)
print(b)
if name==b:
print("很遗憾,平局了")
elif (name=="拳头" and b=="布") or (name=="布" and b=="剪刀") or (name==" 剪刀" or b=="拳头"):
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