Commit a15f3c26 by BellCodeEditor

save project

parent 6ceae207
Showing with 10 additions and 4 deletions
c=input("请出拳(剪刀/石头/布):") c=input("请出拳(剪刀/石头/布):")
print("玩家出拳:"+c) print("玩家出拳:"+c)
import random import random
l=["石头""剪刀","布"] l=["石头","剪刀","布"]
comport=random.choice(l) a=random.choice(l)
print("计算机出拳"+comport) print(a)
\ No newline at end of file if c==a:
print("平局")
elif (c=="石头" and a=="剪刀") or (c=="剪刀" and a=="布") or (c=="布" and a=="石头"):
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