Courseiva
Question 507 of 169
Object-Oriented ProgrammingmediumMultiple SelectObjective-mapped

Mastering Python Class Inheritance: Multiple Base Classes and super()

Which THREE statements about inheritance in Python are correct?

Quick Answer

The correct answer is that the super() function can be used to call a method from a parent class, because super() provides a way to access inherited methods in a child class, especially when dealing with multiple base classes in Python class inheritance. This function resolves the method resolution order (MRO) automatically, ensuring that each parent class’s method is called exactly once, which is critical for avoiding duplication in diamond inheritance patterns. On the Certified Associate Python Programmer PCAP exam, this concept tests your understanding of how Python handles multiple inheritance and the cooperative use of super() to maintain clean, predictable behavior. A common trap is assuming super() only works with single inheritance or that it simply calls the immediate parent, when in fact it follows the MRO chain. Memory tip: think of super() as the “next in line” delegate, not just the direct parent.

⚠ Common exam trap

Python Institute often tests the misconception that private attributes (__name) are completely hidden or not inherited, when in fact they are inherited but name-mangled, and that Python supports method overloading like Java or C++, when it actually relies on default arguments and single method definitions.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

A child class inherits all attributes and methods from its parent class.

In Python, a child class inherits all non-private attributes and methods from its parent class by default. This includes both data attributes and methods, allowing the child to reuse and extend the parent's behavior without redefinition. Private attributes (with double underscore prefix) are name-mangled to _Classname__attribute, but they are still inherited in the sense that they exist in the child's namespace under the mangled name, though direct access by the original name is restricted.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A child class inherits all attributes and methods from its parent class.

    Why this is correct

    Correct, except for name-mangled ones.

  • Private attributes (with __) are inherited unchanged.

    Why it's wrong here

    Name mangling renames them, so they are not directly inherited.

  • Python supports multiple inheritance.

    Why this is correct

    Correct.

  • Python supports method overloading based on parameters.

    Why it's wrong here

    Python does not support method overloading; methods override.

  • The super() function can be used to call a method from a parent class.

    Why this is correct

    Correct.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on PCAP

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO of the following statements about Python class inheritance are correct? (Select exactly two.)

easy
  • A.If a subclass does not define __init__, it automatically inherits the parent's __init__.
  • B.A subclass can override a parent class method.
  • C.A subclass cannot define methods with the same name as a parent class method.
  • D.A subclass inherits all private attributes and methods from the parent class.
  • E.A class can inherit from multiple base classes.

Why A: When a subclass does not define its own __init__, it inherits the __init__ method from the parent class, making it available to instances of the subclass. Option B is correct: Python subclasses can override parent class methods by defining a method with the same name. Option E is correct: Python supports multiple inheritance, allowing a class to inherit from more than one base class. Option C is incorrect: subclasses can define methods with the same name as parent methods (overriding). Option D is incorrect: private attributes (name-mangled with double underscore) are not fully inherited; they are renamed and cannot be accessed directly by their original name from subclasses.

Variation 2. Which of the following statements about class inheritance in Python are true? (Choose two.)

easy
  • A.A class can inherit from only one base class.
  • B.Abstract base classes can be defined using the ABC module.
  • C.A child class can override any method from its parent class, but only if the method is declared as virtual.
  • D.The super() function is used to call a method from a sibling class.
  • E.Python supports multiple inheritance.

Why B: Python's `abc` module (Abstract Base Classes) allows you to define abstract base classes by inheriting from `ABC` and using the `@abstractmethod` decorator. This enforces that subclasses must implement the abstract methods, providing a formal interface contract.

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCAP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCAP exam.