import random # print("1.曹操2.孙权3.刘备") # class Person: # def __init__(self,jue): # while True: # self.jue = int(input("请选择角色序号:")) # if self.jue==1: # self.jue="曹操" # break # elif self.jue==2: # self.jue = "孙权" # break # elif self.jue==3: # self.jue = "刘备" # break # else: # print("输入有错误,请重新输入") # def caiquan(self): # while True: # global quan # quan=int(input("请出拳(选择序号):1.剪刀2.石头3.布")) # if quan==1: # print("{0}的出拳--剪刀".format(self.jue)) # break # elif quan==2: # print("{0}的出拳--石头".format(self.jue)) # break # elif quan==3: # print("{0}的出拳--布".format(self.jue)) # break # else: # print("输入有错误,请重新输入") # cai=Person(1) # cai.caiquan() # class Computer: # def __init__(self,dc): # self.dc="