A methodical Approach


#1



https://www.codecademy.com/en/courses/python-intermediate-en-WL8e4/1/3?curriculum_id=4f89dab3d788890003000096
class Animal(object):
"""Makes cute animals."""
is_alive = True
def init(self, name, age):
self.name = name
self.age = age
def decription(self):
print self.name
print self.age

hippo = ("Giup",122)
hippo.decription()


Oops, try again. It seems like your code raises an error, see the console window for the error message!
Traceback (most recent call last):
File "python", line 13, in
AttributeError: 'tuple' object has no attribute 'decription'

Help! I dont find any mistakes in my code but it still happens.


Replace this line with your code.


#2

The error should be here. You created a class Animal and you want to create an instance of Animal, hippo. You need to do:

hippo = Animal("Giup",122)

Also, I would have loved you format your code so that I/we can see your indentation.


#3

Opps! New error came out!!

class Animal(object):
    """Makes cute animals."""
    is_alive = True
    def __init__(self, name, age):
        self.name = name
        self.age = age   
    def decription(self):
        print self.name 
        print self.age

hippo = Animal("Giup",122)
hippo.decription()

https://www.codecademy.com/en/courses/python-intermediate-en-WL8e4/1/3?curriculum_id=4f89dab3d788890003000096

Animal('Shere Khan', 9).description() caused the following error to be raised: 'Animal' object has no attribute 'description'


#4

check your spelling of description (all of them)


#5

Great! I fixed it. Such a stupid mistake.