
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 4)
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 16–20
- 16
A developer writes: `a = [1, 2, 3]` and `b = a`. They then check `a is b` and `a == b`. What are the results?
Select an answer first - 17
Given the following code: class Base: pass class Derived(Base): pass obj = Derived() Which expression evaluates to True?
Select an answer first - 18
Consider the following code: class Animal: pass class Dog(Animal): pass d = Dog() Which of the following expressions returns True?
Select an answer first - 19
Given the following code: class X: def info(self): return "X" class Y: def info(self): return "Y" class Z(Y, X): pass z = Z() print(z.info()) What is the output?
Select an answer first - 20
Given the following code: class Shape: def area(self): return 0 class Square(Shape): def __init__(self, side): self.side = side def area(self): return self.side ** 2 s = Square(5) print(s.area()) What is the output?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
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.