Python Introduction to Classes Instantiation


Have the exact right code (same as is in the "hint"), is functioning correctly, but the interpreter throws an error.


class Animal(object):
def init(self, name): = name

zebra = Animal("Jeffery")


Oops, try again. Did you set your zebra's name to 'Jeffrey' with zebra = Animal('Jeffrey')?


Hi thsi line

zebra = Animal("Jeffery")

you wrote "Jeffery" instead of "Jeffrey"


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.