Instantiating Your First Object


#1



https://www.codecademy.com/courses/python-intermediate-en-WL8e4/0/5?curriculum_id=4f89dab3d788890003000096#


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


Not sure why this is not correct even though the output is Jeffery. Please help.


class Animal(object):
    def __init__(self, name):
        self.name = name

zebra = Animal("Jeffery")
print zebra.name


#2

you misspelled Jeffrey


#3

well look at that. thank you.


#4

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