Python Object-Oriented Python Instant Objects Method Interactivity

Ingrid Matthews
Ingrid Matthews
1,465 Points

What does "couldn't find Student" mean?

Can anyone help me see what's wrong with my code? Many thanks

first_class.py
class Student:
    self.name = "Your Name"
    self.grade = int("Your grade")

    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):
        if self.grade >= 51:
            praise(self)

        elif self.grade <= 50:
            reassurance(self)

1 Answer

Steven Parker
Steven Parker
201,321 Points

That message just means that some error prevented the class definition from being accepted.

But for this task, the instructions say the method "should take an argument named grade". So it needs to be passed in to the method and not be a class field.

Also, you don't need to modify the definition of the "name" field. It is correct as provided in the original code.