Python Object-Oriented Python Instant Objects Your first method

Kito Middleton
Kito Middleton
2,098 Points

I keep getting "Oh no! You forgot the `self` argument in your `praise` method"

I don't know what I could be doing wrong.....lost

first_class.py
class Student:

    name = "Kito"

    def praise(self):
        print(f"You're doing a great job, {self.name}!")


me = Student()


me.praise()

1 Answer

James Arnold
James Arnold
3,526 Points
class Student:
    name = "Your Name"

    def praise(self):
        return f'Great job {self.name}'

You were close but the directions asked you to return the message from the method compared to printing it.