Question 84 of 511
Object-Oriented ProgrammingmediumMultiple SelectObjective-mapped

Quick Answer

The answer is that a class can inherit from multiple base classes, and Python’s Method Resolution Order (MRO) is determined by the C3 linearization algorithm. This algorithm ensures a consistent, predictable order for method lookup in multiple inheritance scenarios by respecting local precedence order and monotonicity, preventing ambiguous or contradictory resolution paths. On the Certified Associate Python Programmer PCAP exam, this concept tests your understanding of how Python resolves method calls when a class inherits from more than one parent, often appearing in questions about diamond inheritance or super() usage. A common trap is assuming that MRO follows a simple depth-first or left-to-right rule, but C3 linearization overrides that to maintain consistency. To remember the key point, think of the mnemonic “MRO is C3: Consistent, C3 linearization, and Class precedence is monotonic.”

PCAP Object-Oriented Programming Practice Question

This PCAP practice question tests your understanding of object-oriented programming. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which TWO statements about inheritance in Python are true?

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

The Method Resolution Order (MRO) is determined by the C3 linearization algorithm.

Option B is correct because Python's Method Resolution Order (MRO) is determined by the C3 linearization algorithm, which ensures a consistent and predictable order for method lookup in multiple inheritance scenarios. This algorithm produces a linearization that respects the local precedence order and monotonicity, as defined in the Python documentation for class hierarchies.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Abstract base classes can be instantiated if they have no abstract methods.

    Why it's wrong here

    Although technically possible, it is not a recommended practice and not a typical statement about inheritance.

  • The Method Resolution Order (MRO) is determined by the C3 linearization algorithm.

    Why this is correct

    C3 linearization is used to compute MRO in Python.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Private attributes (with double underscore) of the base class are accessible in the subclass.

    Why it's wrong here

    Name mangling makes them inaccessible as original name.

  • A class can inherit from multiple base classes.

    Why this is correct

    Python supports multiple inheritance.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The super() function returns a proxy object for method delegation.

    Why it's wrong here

    While super() does return a proxy, the statement is not always considered true in the context of inheritance semantics; MRO is key.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Python Institute often tests the misconception that `super()` returns a direct parent class instance, when in fact it returns a proxy that follows the MRO, which is essential for cooperative multiple inheritance in Python.

Detailed technical explanation

How to think about this question

The C3 linearization algorithm, used by Python since version 2.3, merges the MROs of parent classes in a way that preserves the order of base classes as listed in the class definition and ensures that a class always appears before its parents. This is critical for resolving diamond inheritance patterns, where a class inherits from two classes that share a common ancestor, preventing ambiguous method resolution. In practice, the MRO can be inspected via `ClassName.__mro__` or `ClassName.mro()`, and a `TypeError` is raised if the linearization is inconsistent (e.g., due to contradictory inheritance hierarchies).

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCAP practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCAP practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCAP question test?

Object-Oriented Programming — This question tests Object-Oriented Programming — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The Method Resolution Order (MRO) is determined by the C3 linearization algorithm. — Option B is correct because Python's Method Resolution Order (MRO) is determined by the C3 linearization algorithm, which ensures a consistent and predictable order for method lookup in multiple inheritance scenarios. This algorithm produces a linearization that respects the local precedence order and monotonicity, as defined in the Python documentation for class hierarchies.

What should I do if I get this PCAP question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Keep practising

More PCAP practice questions

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.