Sep-27-2017, 06:15 PM
Those two snippets of code are different, and the second one shouldn't be giving that error. So... either post the code you're running, or the error you're getting :p
Look at the definition of Cat. In the second code block, it takes a second parameter, how many lives it has. In the first code block, Cat didn't accept any extra parameters, which is why it was failing.
If anything, the error you should be getting would be a NameError for using a variable that wasn't defined.
Look at the definition of Cat. In the second code block, it takes a second parameter, how many lives it has. In the first code block, Cat didn't accept any extra parameters, which is why it was failing.
If anything, the error you should be getting would be a NameError for using a variable that wasn't defined.