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 trial

Python Object-Oriented Python Instant Objects Your first method

First_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.

first_class.py
class Student:
    name = "Any Name"
    def praise(self):
        return("You're doing a amazing, {}".format(self))

name = Student.name
Student.praise(name)
Abdifatah Mohamed
Abdifatah Mohamed
5,289 Points

How can I reply like this blackboard please?

3 Answers

Sorry, missed one point earlier. Need to replace format(self) with format(self.name) as well.

Got it, thank you!

Hi 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.

Thank you, but I'm not sure that's working for me. :/

Hi Cater, What error are you getting?

Bummer: Didn't find the name in the praise message. Be sure to use the instance attribute!