0

getting error on programming on this program

this constructor takes no argument in the line fido=dog("fido","brown")

9th Dec 2016, 7:21 PM
Raunak Rhishabh
Raunak Rhishabh - avatar
4 odpowiedzi
+ 2
share complete code
9th Dec 2016, 7:39 PM
Waqas Asghar Bhalli
Waqas Asghar Bhalli - avatar
+ 1
You get an error because Fido is a dalmatian. Since all dalmatians are white with black spots, Fido cannot be brown. Python knows a lot about dogs for some reason (maybe because it is a snake?), so it catches this error.
13th Dec 2016, 8:48 PM
Nick Bowling
Nick Bowling - avatar
0
Paste the whole code
9th Dec 2016, 7:25 PM
JENN
JENN - avatar
0
I will guess by it saying it takes no arguments that whatever dog() is, it either doesn't have any or only has one parameter and you are therefore passing more arguments to dog() than it can except.
10th Dec 2016, 12:59 AM
Ben Robinson
Ben Robinson - avatar