Python Object-Oriented Python Instant Objects __init__

Maher Wardak
Maher Wardak
1,863 Points

confused with using __init__ & kwargs

what is wrong with my code?

first_class.py
class Student:

    def __init__(self, name, **kwargs)
        self.name = name

        for key, value in kwargs.items():
            setattr(self, key, value)


    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()
        return self.reassurance()

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 48,709 Points

This line should end with a colon

def __init__(self, name, **kwargs):