Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialManuel Winbürger
3,449 Pointsi get this error:"Bummer: Oh no! You forgot the `self` argument in your `praise` method" though i've self in the argumen
i get this error:"Bummer: Oh no! You forgot the self
argument in your praise
method" though i've self in the argument. Where is the error in my code?
class Student:
name = "manu"
def praise(self, name):
return (" you did a great job, {}".format(name))
1 Answer
Michael Cronk
8,970 PointsYou don't need the 'name' inside the def arguments, you also have to make it (self.name) for the format so it refers to the name created in the class.
def praise(self):
return "You did a great job, {}".format(self.name)