0

Am confuse with the super method here

class human: def __init__(self, gender, name, age,): self.gender = gender self.name = name self.age =age def get_name(self): return self.name def is_male(self): if self.gender== 'male': return True return False human1= human('male', 'medx', 19 ) class male(human): super().__init__(gender, name, age) self.voice = voice m1 = male('male','med',18,'male voice')

15th Aug 2022, 10:39 AM
Bean Hong
2 Antworten
0
class male(human): def __init__(self, gender, name, age,voice): super().__init__(gender ,name,age) self.voice = voice
15th Aug 2022, 11:26 AM
Jayakrishna 🇮🇳
15th Aug 2022, 11:20 AM
Ervis Meta
Ervis Meta - avatar