Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 4Objective 5

PCAP-31-03 4.5 Build a Class Hierarchy Using Inheritance PCAP-31 Practice Questions (Page 2)

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

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

Questions 6–10

  1. 6application · easy

    A developer defines `class Shape: def area(self): return 0` and `class Rectangle(Shape): def __init__(self, w, h): self.w = w; self.h = h; def area(self): return self.w * self.h`. What does `Rectangle(3, 4).area()` return?

    Select an answer first
  2. 7application · easy

    A developer has `class Vehicle: pass` and `class Car(Vehicle): pass`. They create `c = Car()`. Which expression evaluates to `True`?

    Select an answer first
  3. 8expert · hard

    A developer defines `class A: def m(self): return "A"`, `class B(A): pass`, `class C(A): def m(self): return "C"`, and `class D(B, C): pass`. What does `D().m()` return?

    Select an answer first
  4. 9foundation · easy

    In the diamond problem, what is the main issue that arises in multiple inheritance?

    Select an answer first
  5. 10foundation · easy

    Given the following code: class Book: def __init__(self, title): self.title = title def __str__(self): return self.title b = Book("Python Basics") print(str(b)) What is the output?

    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.