0

Who can point me to why dis produces an error

class human: def__init__(self, colour, gender, age, Nationality, eyes=2): self.colour=skin self.gender=gender self.age=age Toba=human("black", "male", 26, "Nigerian") Cheryl=human("White", "female", 24, "English",) James=human("Brown", "male", 28, "Italian") print(Toba.gender)

17th Apr 2020, 5:44 PM
Ayo Ashaolu
Ayo Ashaolu - avatar
4 ответов
0
'skin' is not in the parameter list. You need a space between the 'def' and '__init__(blah blah...
17th Apr 2020, 5:55 PM
rodwynnejones
rodwynnejones - avatar
0
Errors = 1. space between def and init 2. variable skin not defined 3. No indentation
17th Apr 2020, 5:56 PM
Akash
Akash - avatar
0
Thanks guys..let me try again
17th Apr 2020, 5:56 PM
Ayo Ashaolu
Ayo Ashaolu - avatar
0
Thanks..it now work
17th Apr 2020, 6:01 PM
Ayo Ashaolu
Ayo Ashaolu - avatar