记录摸鱼生活罢了
#猜拳游戏
import random
computer=random.randint(0,2)
user=int(input("请输入数字0-2中的一个数字"))
# 剪刀=0
# 石头=1
# 布=2
if user>2 or user<0:
print("您输入为error")
print("pc数字为%d"%computer)
else:
if user==0:
s="剪刀"
elif user==1:
s="石头"
if user==2:
s="布"
print("您输入为%s(%d)"%(s,user))
print("pc数字为%d"%computer)
if user==computer:
print("平局")
else:
if (user==0 and computer==2) or (user==1 and computer==0)or (user==2 and computer==1):#赢的情况
print("你赢了")
else:
print('你输啦啦啦')#其余为输