They're Multiplying!


#1


class Animal(object):
"""Makes cute animals."""
is_alive = True
def health():

    print"good"

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('rajat',22)
sloth=Animal("hey",10)
ocelot=Animal("cow",3)
hippo.health()
sloth.health()
ocelot.health()
hippo.description()

Traceback (most recent call last):

Replace this line with your code.


#2

please reply for the above code


#3

please post your code with markup:

So the indent of your code will show

also include: error message and exercise url please


#4

Traceback (most recent call last):
File "python", line 18, in
TypeError: health() takes no arguments (1 given)
"""this is the problem"""


#5

That is 50% please post your code with format, read this topic:

So the indent of your code will show on the forum, look how your code currently looks:

i can't run that, there indent is messed up because you didn't use format


#6

why should i do that..


#7

i was still editing, without format, the indent doesn't show on the forum, i can't run the code, so i can't debug it


#8

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