
Python InstitutePCAP - Certified Associate Python Programmer
Domain 4Objective 1
PCAP-31-03 4.1 Understand the Object-Oriented Approach PCAP-31 Practice Questions (Page 7)
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 51 practice questions to prepare you well beyond it. (estimate)
51questions here
11free pages
7concepts
34%of the exam
Questions 31–35
- 31
A developer is designing a class for a thermostat. The temperature should not be set below 10 or above 30 degrees. To enforce this constraint, which approach is best?
Select an answer first - 32
A company has a base class Shape with a method area() that returns 0. They need a subclass Circle that overrides area() to return the area of the circle. Which code correctly implements this?
Select an answer first - 33
A developer has a class Animal with an __init__ that sets self.name. They create a subclass Dog that should also set self.breed. Which code correctly initializes a Dog object?
Select an answer first - 34
A logistics company needs to track each shipment's weight and destination. They plan to create a Shipment class. Which approach correctly creates two independent shipment objects, each with its own weight and destination?
Select an answer first - 35
A class Animal has a method speak() that prints 'Some sound'. A class Dog inherits from Animal and overrides speak() to print 'Woof'. What is the output of the following code? d = Dog(); d.speak()
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.