Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Python Institute logo

Python InstitutePCAP - Certified Associate Python Programmer

Domain 2Objective 1

PCAP-31-03 2.1 Handle Errors Using Python-Defined Exceptions PCAP-31 Practice Questions (Page 2)

Part of the Exceptions domain, which accounts for 14% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~4–6 in this domain), expect 2–3 from this objective — we provide 23 practice questions to prepare you well beyond it. (estimate)

23questions here
5free pages
11concepts
14%of the exam

Questions 6–10

  1. 6expert · medium

    A developer writes: try: risky() except LookupError: handle_lookup() except IndexError: handle_index(). A bug causes risky() to raise IndexError. Which handler runs?

    Select an answer first
  2. 7foundation · easy

    What happens if an exception not listed in the tuple is raised in a grouped except clause?

    Select an answer first
  3. 8foundation · easy

    What is the main benefit of using an else clause in a try/except block?

    Select an answer first
  4. 9foundation · easy

    Given the following code, which exception will be caught by the first except clause? try: raise ValueError('bad value') except Exception: print('Exception caught') except ValueError: print('ValueError caught')

    Select an answer first
  5. 10foundation · easy

    Which ordering of except clauses is correct to handle exceptions properly?

    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.