0
getting error on programming on this program
this constructor takes no argument in the line fido=dog("fido","brown")
4 odpowiedzi
+ 2
share complete code
+ 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.
0
Paste the whole code
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.