Python:A Methodical Approach


Hello friends ,I am have question for you

Although my code is correct,I get following output


What is the meaning of these "None"?This seems to be present at the end of all challenges output.Why is this so?Where is the commands in my code which prints them out?Follwing is my code

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
print hippo.description()


function and methods return None by default. Your description method doesn't return anything, but you have print in front of method call, causing None to be printed

i suspect the last none to be from codecademy, but repl doesn't work at the moment, try running your code there to see how it looks


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