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 trialwilliam coleman
4,391 PointsMy code seems to work everywhere except in this code challenge. Is my answer wrong?
I keep getting the error that says I forgot the self parameter in my praise method. I'm not sure why. I have self as a parameter in the praise method. Is my code wrong or is the code challenge wrong?
class Student:
name = "Will"
def praise(self):
print(f"Good job, {self.name}!")
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, william coleman ! You're doing terrific and I love that you're using f-strings here. But yes, your code is currently incorrect, but not by much. It comes down to an interpretation of the instructions. The challenge asks you to return
the string, but you're printing the string. It's expecting to get back a value, but not getting back anything at all. Simply changing your print
statement to a return
statement causes this to pass.
Hope this helps!
william coleman
4,391 Pointswilliam coleman
4,391 PointsThanks! Very helpful!