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 9)

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 41–45

  1. 41expert · hard

    A developer is creating a class Counter that counts the number of instances created. They want to use a class variable count that is incremented in __init__. Which code correctly implements this?

    Select an answer first
  2. 42expert · hard · select all that apply

    A developer is designing a class hierarchy for a vehicle system. They have a base class Vehicle with a method start() that prints 'Vehicle started'. They want a subclass Car that overrides start() to print 'Car started' and also calls the parent start(). Which code snippets achieve this? (Select all that apply.)

    Select an answer first
  3. 43expert · hard

    A developer is implementing a class with a private attribute __balance. They want to provide a method to deposit money that also validates the amount is positive. Which approach best encapsulates the attribute and enforces the validation?

    Select an answer first
  4. 44application · medium

    A bank wants to model a BankAccount class where each account has a balance and a method to deposit money. Which code snippet correctly defines the class so that each account starts with a balance of 0 and can be deposited into?

    Select an answer first
  5. 45application · medium

    A developer wants to protect a User object's password attribute from direct modification. They decide to use name mangling. Which attribute name should they use inside the class?

    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.