School Catalogue project in Python - error

Hi, I’m struggling with understanding what the problem really is in my code for the primary school class in the school catalogue project. The error message is simply not helpful, to me nothing seems to be wrong in my code.

class PrimarySchool(School): def __init__(self, name, "primary",numberOfStudents, pickupPolicy): super().__init__(self, name, "primary",numberOfStudents, pickupPolicy) self.pickupPolicy = pickupPolicy def getPickupPolicy(self): return self.pickupPolicy def __repr__(self): super().__repr__() return School.__repr__() + f"The pickup policy is {self.pickupPolicy}" testSchool = PrimarySchool("Mircea cel Batran", 120, "Pickup Allowed") print(testSchool.getpickupPolicy()) print(testSchool)

The problem seems to be of syntactical nature and its regarding the def init() function, but Im at a loss for what the problem is.

The error I get is " File “script.py”, line 23
def init(self, name, “primary”,numberOfStudents, pickupPolicy):
^
SyntaxError: invalid syntax"

HI!
One of the things listed in your init definition isn’t a valid variable name.
The level isn’t needed as part of the init parameters, you’re not going to be declaring it when you create an instance.
It’s being declared by default with the super line.

You might get an error about your next line too. It’s calling the init for the original School class. It doesn’t need to include self, but the other parameters need to match up.

i.e.
init (self, name, numberOfStudents, pickUpPolicy)

super().init(name, “primary”, numberOfStudents)

pickUpPolicy is being assigned on the line below

Hope that helps.