8/19 Confused with instructions


#1
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("Robert", 5324)

I didn't call hippo.description() and I passed for some reason.
Also, in the instructions it says
Then, create an instance of "Animal", "hippo" (with whatever name and age you like), and call its "description" method.
I how to call a function [defined by def description(self): stuff?] but I don't create an instance of "Animal", "hippo". Explanation would be appreciated. Thanks


#2

Your code is good. The SCT could be just looking at the class code, and not looking for your output. Usually it will create its own instance and test that. No reason to not pass this.

 > hippo.description()
 Robert
 5324
 > type(hippo)
=> <class '__main__.Animal'>