🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Inheritance: all 10 questions

Quiz: Inheritance · Question 6 of 10

What does super().init(brand, 2) do in a Python child class?

What does super().__init__(brand, 2) do in a Python child class?

  1. A.Creates a new parent object separate from the child
  2. B.Deletes the parent's constructor
  3. C.Runs the parent's constructor to set up the inherited fields
  4. D.Calls the child's constructor again
Answer & explanation

Correct answer: Runs the parent's constructor to set up the inherited fields

super() reaches the parent's version so the child reuses its setup.

Can you get the rest right without peeking?

Take the timed Quiz: Inheritance quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →