Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 4Objective 2

PCAP-31-03 4.2 Employ Class and Object Properties 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 21 practice questions to prepare you well beyond it. (estimate)

21questions here
5free pages
8concepts
34%of the exam

Questions 16–20

  1. 16expert · hard

    A developer is refactoring a class and wants to rename a private instance variable from `__data` to `__info`. The class is used by external code that accesses `obj._ClassName__data`. What is the impact of this rename?

    Select an answer first
  2. 17foundation · easy

    What does the __dict__ attribute of an instance contain?

    Select an answer first
  3. 18foundation · easy

    Given the class definition below, what will be the output of the code? class Car: def __init__(self, brand): self.brand = brand car1 = Car('Toyota') car2 = Car('Honda') print(car1.brand)

    Select an answer first
  4. 19foundation · easy

    What does the __dict__ attribute of a class contain?

    Select an answer first
  5. 20expert · hard

    A class `Settings` has a class variable `theme = 'light'`. A developer executes: `s = Settings(); s.theme = 'dark'; t = Settings()`. What is the value of `t.theme` and `Settings.theme`?

    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.