Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 4Objective 1

PCAP-31-03 4.1 Understand the Object-Oriented Approach 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 51 practice questions to prepare you well beyond it. (estimate)

51questions here
11free pages
7concepts
34%of the exam

Questions 16–20

  1. 16application · easy

    A developer needs to model a library system. Each book should have a title, author, and a method to display its info. Which class definition correctly creates a Book object and allows calling display_info()?

    Select an answer first
  2. 17application · medium

    A developer is building a user authentication system. The password should not be readable from outside the class. Which approach best achieves this?

    Select an answer first
  3. 18expert · hard

    A developer is extending a class hierarchy. The base class Vehicle has a method start() that prints "Engine started". The subclass ElectricCar overrides start() to print "Motor started". However, the developer also wants to log the base class action. Which code correctly logs the base class action and then overrides the behavior?

    Select an answer first
  4. 19expert · hard

    A developer is debugging a class where an attribute is not accessible from outside. The class defines self.__data. The developer tries to access obj.__data and gets an AttributeError. What is the correct way to access this attribute from outside the class?

    Select an answer first
  5. 20expert · medium

    A developer has a class A with a method greet() that returns "Hello". Class B inherits from A and overrides greet() to return "Hi". Class C inherits from B and does not override greet(). What does c.greet() return?

    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.