- A
A child class inherits all attributes and methods from its parent class.
Correct, except for name-mangled ones.
- B
Private attributes (with __) are inherited unchanged.
Why wrong: Name mangling renames them, so they are not directly inherited.
- C
Python supports multiple inheritance.
Correct.
- D
Python supports method overloading based on parameters.
Why wrong: Python does not support method overloading; methods override.
- E
The super() function can be used to call a method from a parent class.
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.
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 THREE statements about inheritance in Python are correct?
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.
Option A is correct because 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.
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.
- ✓
A child class inherits all attributes and methods from its parent class.
Why this is correct
Correct, except for name-mangled ones.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
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.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
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.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
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.
Detailed technical explanation
How to think about this question
Under the hood, Python's inheritance uses the MRO (Method Resolution Order) via the C3 linearization algorithm to determine which method to call when a method is invoked on an instance. The super() function leverages this MRO to call the next method in the chain, which is crucial for cooperative multiple inheritance (e.g., in diamond inheritance scenarios). In real-world frameworks like Django, super() is commonly used in model inheritance to ensure proper initialization of parent classes.
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 company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.
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.
- →
Object-Oriented Programming — study guide chapter
Learn the concepts, then practise the questions
- →
Object-Oriented Programming practice questions
Targeted practice on this topic area only
- →
All PCAP questions
511 questions across all exam domains
- →
Certified Associate Python Programmer PCAP study guide
Full concept coverage aligned to exam objectives
- →
PCAP practice test guide
How to use practice tests most effectively before exam day
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.
Modules and Packages practice questions
Practise PCAP questions linked to Modules and Packages.
Strings practice questions
Practise PCAP questions linked to Strings.
Object-Oriented Programming practice questions
Practise PCAP questions linked to Object-Oriented Programming.
Exceptions and File I/O practice questions
Practise PCAP questions linked to Exceptions and File I/O.
PCAP fundamentals practice questions
Practise PCAP questions linked to PCAP fundamentals.
PCAP scenario practice questions
Practise PCAP questions linked to PCAP scenario.
PCAP troubleshooting practice questions
Practise PCAP questions linked to PCAP troubleshooting.
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: A child class inherits all attributes and methods from its parent class. — Option A is correct because 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.
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 →
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 B: Option B is correct because Python allows a subclass to define a method with the same name as a method in its parent class, which overrides the parent's implementation. When the method is called on an instance of the subclass, Python's method resolution order (MRO) will find the subclass's version first, effectively hiding the parent's method.
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: Option B is correct because 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.
Keep practising
More PCAP practice questions
- Which TWO of the following are valid ways to raise an exception in Python?
- Match each Python operator to its precedence level (1=highest).
- Match each Python module to its purpose.
- Drag and drop the steps to create and activate a virtual environment in Python into the correct order.
- Drag and drop the steps to create a Python package with subpackages into the correct order.
- Drag and drop the steps to handle an exception in Python using try-except-finally into the correct order.
Last reviewed: Jun 30, 2026
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.
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.
Sign in to join the discussion.