import random
#1.定义2个变量来完成 玩家和电脑的数据保存
#玩家
playerInput = input("请大输入(0剪刀 1石头 2布):")
player = int(playerInputa)#电脑
mac = random.randint(0,2)#2.判断谁输谁赢
if(player==0 and mac==2) or (player==1 and player==0) or (player==2 >and mac==1):
#赢了
print("赢了100元,真高兴!")
elif player == mac:
#平局
print("平局,再来一局?")
else:
#输了
print("胜败乃兵家常事,大侠请重新来过")
网友评论