Methodical Approach


Below is my code from exercise 8, Methodical Approach.
When submitted, i get the error:

Traceback (most recent call last):
File "python", line 13, in
TypeError: takes no parameters

What does this mean/what am i doing wrong???

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

hippo = Animal("Ele",12)


Hi this line

def init(self, name, age):

you should put init like that

def __init__(self,..)


Thank you!! I though I might've been doing something stupid!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.