They're Multiplying!


#1



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


Template says "Did you create a new animal, "Sloth"?


class Animal(object):
    """Makes cute animals."""
    is_alive = True
    health = "good"
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def description(self):
        print self.name
        print self.age
        
    hippo = Animal("Einaar", 10)
    sloth = Animal("Alden", 11)
    ocelot = Animal("Willow", 25)
    
    print hippo.health
    print sloth.health
    print ocelot.health
    
    description(hippo)


#2

it is printing out
good
good
good
Einaar
10
in the template so the code is working but it wont let me pass.


#3

declaring an class instance:

hippo = Animal("Einaar", 10)
sloth = Animal("Alden", 11)
ocelot = Animal("Willow", 25)

should be outside declaring the class itself


#4

thank you i have solved this :slight_smile:


#5