Syntax error

class School():

def init(self, name, level, numberOfStudents): = name

self.level = level

self.numberOfStudents = numberOfStudents


def get_name(self):


def get_level(self):

return self.level

def get_numberOfStudents(self):

return self.numberOfStudents      


def set_numberOfStudents(self, no):

self.numberOfStudents = no

def repr(self):

return ("A {} school named {} with {} students".format(self.level,, str(self.numberOfStudents))

_______________ class school___________

a = School(“aa”, “bb”, 10)



class PrimarySchool(School):


Python is showing invalid intax at
class PrimarySchool(School):
SyntaxError: invalid syntax
but I dont get what is wrong in it

If you’re catching syntax errors on line you think are valid then check preceding lines for things that might not have been properly closed, e.g. parentheses.

1 Like