Python Object-Oriented Python Instant Objects Method Interactivity

Mark Nembhard
Mark Nembhard
1,385 Points

Not sure how to trigger the right result calling a method with a class

i see what needs to be done but i cannot supply the correct code to provide the result if a student goes over 50 in their test or equal and/or below 50. I am getting confused on the syntax and the use of "self". I understand it is an instance of a class or method but i am not quite getting the syntax
class Student:
    name = "Mark"

    def feedback(self,grade):
        self.grade = 51
        if self.grade > 50:
            def praise(self):
                return "You inspire me, {}".format(
        elseif self.grade<= 50
            def reassurance(self):
                return "Chin up, {}. You'll get it next time!".format(

1 Answer

Steven Parker
Steven Parker
201,320 Points

Here's some hints:

  • don't change the originally provided code, including the indentation
  • add your new code after the provided code, don't mix it in between
  • code in a class should not reference the class by name, so use "self." instead of "Student."
  • when calling a method, the name should be followed by parentheses (even if no arguments are passed)