class Idiot: __init__(self,x,y,z): self.name = x self.sex = y self.why = z
printing_idiots(self): print('{} is so idiot.'.format(self.name)) print('{0} is {1}.'.format(self.name,self.sex)) print('Why is he idiot,{}'.format(self.why))
setting_idiots_data(self): print("What is idiot's name?") self.name = input() print("What is idiot's sex?") self.sex = input() if (self.sex = men): print('Why is he idiot?') self.why = input() elif (self.sex = woman): print('Why is she idiot?') else: print('you are a bullsit guy!')
__init__(self,x,y,z):
self.name = x
self.sex = y
self.why = z
printing_idiots(self):
print('{} is so idiot.'.format(self.name))
print('{0} is {1}.'.format(self.name,self.sex))
print('Why is he idiot,{}'.format(self.why))
setting_idiots_data(self):
print("What is idiot's name?")
self.name = input()
print("What is idiot's sex?")
self.sex = input()
if (self.sex = men):
print('Why is he idiot?')
self.why = input()
elif (self.sex = woman):
print('Why is she idiot?')
else:
print('you are a bullsit guy!')
idiot = Idiot()
idiot.setting_idiots_data()
idiot.printing_idiots()
このソースコードのイニシャライザの部分でエラーが出ている。