8/19


#1

class Animal(object):
"""Makes cute animals."""
is_alive = True
def init(self, name, age):
self.name = name
self.age = age
def description(self):
print self.name
print self.age
hippo = Animal(name="Jake",age=29)
hippo.description()

help me solve this


#2

Proper formatting would help decipher it.

Use of the </> key or three ` = tilde ket before and after the code would be good.

Now on to your issue.

It looks like indentation is a problem you have.

class Animal(object):
    """Makes cute animals."""

    is_alive = True

    def __init__(self, name, age):
        self.name = name
        self.age = age

    def description(self):
        print(self.name)
        print(self.age)

That should do it now. Let me know if there are any more issues.


#3

It works. Thanks! No problems at all. The further into the Python course, the more problems people seem to be finding.


#4

What about the hippo?


#5
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("Hippy", 10)

hippo.description()

This code worked for me. I hope it works for you.