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 trialCarter Ellis
1,323 PointsFirst_classs.py issue
So I thought this was correct but I keep getting bummer, I'm fairly certain I consistently used spaces, I can't figure out what's wrong, maybe I misunderstood the question. Please help.
class Student:
name = "Any Name"
def praise(self):
return("You're doing a amazing, {}".format(self))
name = Student.name
Student.praise(name)
3 Answers
MUHAMMAD talha arshad
436 PointsSorry, missed one point earlier. Need to replace format(self) with format(self.name) as well.
Carter Ellis
1,323 PointsGot it, thank you!
MUHAMMAD talha arshad
436 PointsHi Carter, am sorry, I dint look at the challenge earlier.
Remove the part under end of Class (i.e. from name = ...onwards) + replace "self" with "self.name" in format (format(self.name) - and it should work
Actually instance is initiated and called by the testing code itself.
Carter Ellis
1,323 PointsThank you, but I'm not sure that's working for me. :/
MUHAMMAD talha arshad
436 PointsHi Cater, What error are you getting?
Carter Ellis
1,323 PointsBummer: Didn't find the name in the praise message. Be sure to use the instance attribute!
Abdifatah Mohamed
5,289 PointsAbdifatah Mohamed
5,289 PointsHow can I reply like this blackboard please?