プログラミング超初心者の質問
at TECH
1:名無しさん
21/03/26 19:47:53.89 UdurcVDt.net
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!')
idiot = Idiot()
idiot.setting_idiots_data()
idiot.printing_idiots()
このソースコードのイニシャライザの部分でエラーが出ている。
レスを読む最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
1100日前に更新/17 KB
担当:undef