Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1super().__init__(name, age) | AThe child sets its own attribute before calling the parent's __init__. Call super().__init__() first so the inherited setup runs before the child adds its own attributes. | |
| 2super().describe() | Bclass Student(Person): | |
| 3A child class runs the parent's setup first, then adds an attribute that only the child has | Cself is passed explicitly to super().__init__(). super() already supplies self, so it should be super().__init__(name). | |
| 4A child class declares that it inherits from a parent class named Person | DCalls the parent class's version of an overridden method from inside the child class | |
| 5def __init__(self, name, year): self.year = year super().__init__(name) | Edef __init__(self, name, wage): super().__init__(name) self.wage = wage | |
| 6super().__init__(self, name) | FPasses name and age up to the parent class's __init__ so it sets up the inherited attributes |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
super().__init__() — Runs the parent class's __init__ first so it sets up inherited attributes, then the child's __init__ adds its own extra attributes. super().__init__(name)
self.breed = breeddef describe(self):
super().describe()
print("Breed:", self.breed)def describe(self, prefix):
super().describe(prefix) # child-only attribute
self.team = teamdef describe(self):
super().describe()
print("Breed:", self.breed)