← Back to Question List
Python Quiz #36
Calling The Parent Constructor
What does the super().__init__(name, grades) line do inside HonourStudent?
📄 Code
1class Student:2 def __init__(self, name: str, grades: list[float]) -> None:3 self.name = name4 self.grades = grades567class HonourStudent(Student):8 def __init__(self, name: str, grades: list[float], award: str) -> None:9 super().__init__(name, grades)10 self.award = award111213maya = HonourStudent("Maya", [88, 92, 75], "Gold")14print(maya.name, maya.award)