Commit bee50fca by BellCodeEditor

auto save

parent c256c561
Showing with 21 additions and 2 deletions
# 我们都爱夸夸夸
\ No newline at end of file
import random
pn=0
rn=0
while pn<2 or rn<2:
p=input("玩家请出拳 石头\剪刀\\n")
print("玩家出拳"+p)
list=["石头","剪刀","布"]
r=random.choice(list)
print("电脑出拳"+r)
if p not in list:
print("玩家再乱输入就给玩家吃老八秘制小汉堡")
if p==r:
elif (p=="石头" and r=="剪刀") or (p=="剪刀" and r=="布") or (p=="布" and r=="石头"):
pn=pn+1
else:
rn=rn+1
if pn==2:
print("可喜可贺,喜可喜贺,你赢了!")
else rn==2:
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