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 trialRicardo Franco
Data Analysis Techdegree Student 16,258 PointsStuck trying to figure out the code challenge
I am not completely clear as to what needs to be accomplished here to complete the code challenge. I even included "name" as a second parameter in the praise method to see if that would solve the problem but I am not having any luck. Thank you, in advance, for your time and assistance.
class Student:
name = "Ricardo"
def praise(self):
if self.name:
return print("I really like your hair today, {}!".format(self))
Student.praise()
2 Answers
Mark Sebeck
Treehouse Moderator 38,105 PointsIn your return you need self.name. You just have self. You can delete the if statement and the Student.praise(). Also the return doesn't need the print statement. Just return the string.
Let me know if you need more help
Ricardo Franco
Data Analysis Techdegree Student 16,258 PointsI might need your help on the next challenge. I might not be fully understanding the directions quite yet on these challenges.
Ricardo Franco
Data Analysis Techdegree Student 16,258 PointsRicardo Franco
Data Analysis Techdegree Student 16,258 PointsThank you Mark...I really appreciate it
Mark Sebeck
Treehouse Moderator 38,105 PointsMark Sebeck
Treehouse Moderator 38,105 PointsYou are welcome.