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

please help return a method

do i need to add another parameter

first_class.py
class Student:
    name = "Emmanuel"

    def praise(self):
         positive_message=("You're doing a great job, {}!".format(name))
            return(positive_message)

1 Answer

Renato Guzman
Renato Guzman
51,436 Points

Hi! I think you are missing the self. In the method praise, name is not defined, in order to access to the name of the class you must access it via self.name instead of name