8. A Methodical approach


My code:

class Animal(object):
    """Makes cute animals."""
    is_alive = True
    def __init__(self, name, age):
        self.name = name
        self.age = age
    # Add your method here!
def description(self):
    print self.name
    print self.age
hippo = Animal

I even put hippo.description(Animal) earlier and that didn't work.
Error: Traceback (most recent call last):
File "python", line 12, in
AttributeError: type object 'Animal' has no attribute 'description'

Need help.


HI you should finish the instance here

hippo = Animal

And your function description should be inside the class Animal


What do you mean by that.


you should creat a instance like that

hippo = Animal("Hola", 58);

and for the function decription it should...

class Animale
    def Im_inside_the_class_Animal(self):

def Im_outside_the_class_Animal

inside the class Animal


I think it was a indentation problem


HI did you pass it..?