
Python InstitutePCAP - Certified Associate Python Programmer
Domain 4Objective 5
PCAP-31-03 4.5 Build a Class Hierarchy Using Inheritance PCAP-31 Practice Questions (Page 5)
Part of the Object-Oriented Programming domain, which accounts for 34% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~9–15 in this domain), expect 2–3 from this objective — we provide 24 practice questions to prepare you well beyond it. (estimate)
24questions here
5free pages
8concepts
34%of the exam
Questions 21–24
- 21
A developer has `class Animal: pass` and `class Dog(Animal): pass`. They create `d = Dog()`. Which expression evaluates to `True`?
Select an answer first - 22
Consider the following code: class Person: def __init__(self, name): self.name = name def __str__(self): return f"Person: {self.name}" p = Person("Alice") print(p) What is the output?
Select an answer first - 23
A team defines `class A: def greet(self): return "A"`, `class B(A): def greet(self): return "B"`, and `class C(A): def greet(self): return "C"`. They then define `class D(B, C): pass`. What does `D().greet()` return?
Select an answer first - 24
A developer writes: `x = [1, 2]` and `y = [1, 2]`. They then check `x is y` and `x == y`. What are the results?
Select an answer first
Finished these 4 questions?
Review the revealed explanations, or continue through the curriculum.
No more pagesBack to PCAP-31
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Python Institute. “PCAP-31” is a trademark of its owner, used for identification only.