Python Object-Oriented Python Instant Objects Method Interactivity

Not sure why "Exception: name 'praise' is not defined" anyone help?

Cant seem to get these methods once again..

first_class.py
class Student:
    name = "Your Name"

    def praise(self):
        return "You inspire me, {}".format(self.name)

    def reassurance(self):
        return "Chin up, {}. You'll get it next time!".format(self.name)

    def feedback(self, grade):
        if grade > int(50):
            return praise()
        return reassurance()

1 Answer

Steven Parker
Steven Parker
200,698 Points

When referencing an attribute or method of a class, you must use "self." in front of the name.