Python Object-Oriented Python Instant Objects Method Interactivity

Albaraa Maktabi
Albaraa Maktabi
1,649 Points

I don't understand what the error is

I still get 'try again' error without explaining what the error is

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 > 50:
            praise()
        else:
            reassurance()

1 Answer

Scott Bailey
Scott Bailey
13,168 Points
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 > 50:
            return self.praise()
        else:
            return self.reassurance()

At the end of your feeback method you forgot to include ":" You also need to "return" the methods and the end of the if statements.

Hope this helps!