A Methodical Appoarch


#1



I completed it. But wanted to know why the method description took the argument self only and not name and age as well.


Replace this line with your code.


#2

Only the __init__ function needs parameters so they get instantiated in the class. Methods that use those variables only need self which is the instance object representation.

Eg.

def __repr__(self):
    return "This is %s with age %s" % (self.name, str(self.age))

#3

Much appreciated mtf


#4

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