Commit b5764799 by BellCodeEditor

save project

parent 3515f1dd
Showing with 18 additions and 2 deletions
# 我们都爱夸夸夸 p=input("请出拳(剪刀/石头/布):")
\ No newline at end of file print("你出的是:"+p)
#自己出拳
import random
list=["石头","剪刀","布"]
c=random.choice(list)
print("计算机出拳:"+c)
#计算机出拳
if p ==list:
if p==c:
print("平局")
elif (p=="石头" and p=="剪刀") or (p=="剪刀" and p=="布") or (p=="布" and p=="石头"):
print("恭喜,你赢了")
else:
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