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 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 51 practice questions to prepare you well beyond it. (estimate)

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

Questions 21–25

  1. 21expert · easy

    A developer is reviewing a class definition and needs to identify which attributes are instance attributes and which are class attributes. Given the following code: class Employee: company = "ACME" def __init__(self, name): self.name = name Which statement is correct?

    Select an answer first
  2. 22expert · medium

    A developer is designing a class for a bank account. The class has a private attribute __balance and a method get_balance() that returns the balance. The developer wants to allow external code to add money to the account, but only through a method that validates the amount is positive. Which method should be added?

    Select an answer first
  3. 23expert · medium

    A developer is creating a class to represent a point in 2D space. The class should have x and y coordinates and a method distance_from_origin() that returns the Euclidean distance. Which class definition correctly implements this?

    Select an answer first
  4. 24expert · medium

    A developer is working with a class that has a private attribute __secret. They want to provide read-only access to it from outside the class. Which approach is best?

    Select an answer first
  5. 25application · medium

    A banking app stores account balances. The developer wants to prevent accidental direct modification of the balance attribute from outside the class. Which approach should be used?

    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.