Commit b6d0c0b7 by BellCodeEditor

save project

parent 24141670
Showing with 9 additions and 3 deletions
plyer=input("请出拳") import random as r
p=input("请出拳")
print("玩家出拳:"+plyer) print("玩家出拳:"+plyer)
import random as r import random as r
gf=["石头","剪刀","布"] gf=["石头","剪刀","布"]
b=r.choice(gf) b=r.choice(gf)
print("计算机出拳:"+b) print("计算机出拳:"+b)
\ No newline at end of file if p==b:
print("平局")
elif (p=="石头"and b=="剪刀")or(p=="剪刀"and "布")or(p=="布"and b=="石头"):
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