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