PCAP-31-04 practice exams
PCAP - Certified Associate Python Programmer
PCAP (PCAP-31-04) as the Python Institute sets it out: imports, namespaces, sys.path, packages and pip; exception handling, the hierarchy, raising and custom exceptions; Unicode, string immutability, comparison and searching; classes, instance and class variables, name mangling, introspection, inheritance, the MRO and initialisation; comprehensions, match-case, loop else, lambdas, map, filter, closures, file I/O and pathlib; and unit testing, debugging, version control, code review and responsible AI-assisted coding.
What you get
Papers are cut from the bank and weighted like the real exam, and no question appears in two of them. Every wrong answer comes back on later days until you have it right.
What the exam covers
| Modules and Packages | 12% |
| Exceptions | 12% |
| Strings | 9.5% |
| Object-Oriented Programming | 28.5% |
| Advanced Python Constructs and I/O | 24% |
| Testing, Debugging, Collaborative Development, and AI Assistance | 14% |
Two sample questions
1. A developer validates user input with assert, and it stops working in production. What is the most likely cause?
Show the answer
B. Use explicit checks and exceptions for input validation.
2. A developer must call sqrt from the math module. Which two import forms let them write sqrt(16) directly, without a module prefix?
Show the answer
A and B. Both from forms bind sqrt in the current namespace. import math binds only math, so the call needs math.sqrt, and import math as sqrt binds the module itself to the name sqrt.
The real PCAP-31-04 exam
| Length | 65 minutes |
|---|---|
| Questions | 42 |
| Pass mark | 72% |
| Exam fee (paid to the vendor) | See the OpenEDG Store for the current price |
| Recommended before you sit it | None. PCEP-level knowledge is recommended. |
| Valid for | 5 years |
Exam facts as published by Python Institute; always check the vendor’s page before you book.
Study PCAP-31-04 with Chiron
Launch offer until 31 December 2026: your first exam free for 30 days, no credit card and nothing renews. Every PCAP-31-04 paper, drill and course note is included. Leave your email and your invitation follows, usually within a few hours.