PCAP Object-Oriented Programming Practice Question
Which THREE of the following are true about Python's object-oriented programming features?
⚠ Common exam trap
Python Institute often tests the misconception that Python supports method overloading like Java or C++, leading candidates to incorrectly select Option A, when in fact Python uses dynamic typing and late binding to handle different argument patterns through default or variable arguments.
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
✓
Python supports multiple inheritance
Python's class hierarchy supports multiple inheritance, allowing a class to inherit from more than one parent class. This is a core feature of Python's object-oriented programming model, implemented via the C3 linearization algorithm (Method Resolution Order, or MRO) to resolve method and attribute lookups unambiguously.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Python supports method overloading based on argument types
Why it's wrong here
Python does not support method overloading in the traditional sense where the same method name can coexist with different signatures and the compiler selects one based on argument types. Defining multiple methods with the same name in a class body simply overwrites the previous definition, leaving only the last one in scope. Instead, a single function must handle varying arguments through default parameter values, *args/**kwargs, or explicit type checks such as isinstance(). This design reflects Python's dynamic, duck-typed nature, where the runtime handles argument binding rather than compile-time overload resolution.
- ✓
Python supports multiple inheritance
Why this is correct
Multiple inheritance is a first-class feature in Python: class Derived(Base1, Base2) creates a class that inherits attributes and methods from all listed base classes. To resolve conflicts, Python computes a linearization order (MRO) using the C3 algorithm, which determines the sequence in which base classes are searched for attributes. This MRO also enables cooperative behavior with super(), making mixin classes a common and safe pattern, though diamond hierarchies require deliberate design.
- ✓
All methods are virtual in the sense that they can be overridden
Why this is correct
Every method in Python is 'virtual' in the sense that a subclass can always override it and the override takes effect at runtime, regardless of the static type of the reference. Because attribute and method lookup happens dynamically on the instance's actual class via the MRO, there is no keyword like 'final' or 'sealed' that can prevent a subclass from redefining a method. This uniform dynamic dispatch applies even to inherited special methods, making Python's polymorphism open-ended; language-level, all methods are overridable.
- ✗
Python enforces access modifiers like private and protected
Why it's wrong here
Python does not enforce access modifiers; the underscore conventions are purely advisory. A single leading underscore marks an attribute as 'protected' by convention, while double leading underscores invoke name mangling to _ClassName__attribute, which is specifically intended to avoid accidental overrides in subclasses, but it still can be accessed directly. There are no private keywords and no runtime checks preventing access from outside the class, so encapsulation relies on programmer discipline and tools like pylint and mypy rather than on interpreter-enforced restrictions.
- ✓
Operator overloading can be implemented by defining special methods like __add__
Why this is correct
Operator overloading in Python is implemented by defining dunder (special) methods that the interpreter invokes when an operator is applied. For example, the + operator calls __add__(self, other), and if that returns NotImplemented, Python falls back to __radd__ on the other operand. This protocol-based approach allows user-defined classes to integrate smoothly with arithmetic, comparison, and container operations. It is analogous to method overload resolution but driven by the operands' actual types at runtime rather than by static signatures.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCAP question from scratch — 421 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.