Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Exam preparation

Python Institute PCAP-31-03 Exam Guide for the Certified Associate in Python Programming

PCAP-31-03 is the code of the Python Institute Certified Associate in Python Programming Exam, part of the Certified Associate in Python Programming certification. You get 75 questions and 65 minutes. It is scored across 5 exam topics. Exam block #4: Object-Oriented Programming carries the most weight (34%). 11 free practice questions with answers and explanations are online for your exam preparation.

PCAP-31-03 Exam Details

Exam Code
PCAP-31-03
Real Exam Questions
75
Time Limit
65 min
Free Practice Questions
11
Full Question Set
154
Exam Topics
5
Last Updated
December 3, 2026
Exam Name
Certified Associate in Python Programming Exam
Question Types
MCQs
Certification
Certified Associate in Python Programming
Difficulty Level
Associate
Technology
Python 3.x
Job Role
Software Developers

PCAP-31-03 Exam Topics and Weights

Exam Block #1: Modules and Packages

12% of the exam

What this topic covers

Work with imports and nested packages, and understand how Python finds modules through sys.path. Use tools such as dir(), math, random, and platform to inspect modules and runtime details.

What is the difference between import math and from math import sqrt?

import math binds the module name, so you call math.sqrt(). from math import sqrt binds only that function name, so you call sqrt() directly. Both load the module once, and the choice only changes how names are written in your code.

Exam Block #2: Exceptions

14% of the exam

What this topic covers

Handle errors with suitable except clauses, including binding exceptions for their arguments and separating conversion errors from file failures. Use raise and assert, understand exception inheritance, and define custom exceptions.

Why bind the error with except ValueError as e?

Binding with as e keeps the exception object, so you can read e.args or print it for diagnostics. A separate except OSError handler can then deal with file failures on its own. Name specific classes rather than using a bare except, which hides the cause of the failure.

Exam Block #3: Strings

18% of the exam

What this topic covers

Work with Unicode strings, indexing, slicing, and immutable text. Use methods such as join(), split(), and rfind(), and apply string tests, comparisons, and searching.

What value does rfind() return when the substring is absent?

rfind() returns -1 when the substring is not found. When it is found, rfind() returns the highest index where the match starts, because it searches from the right. find() works the same way but returns the lowest matching index.

Exam Block #4: Object-Oriented Programming

34% of the exam

What this topic covers

Define classes, constructors, methods, and instance or class attributes, and understand how instances can override shared defaults. Apply inheritance, polymorphism, isinstance(), and name mangling to class designs.

How does Python rewrite a name like __balance inside a class?

Python changes it to _ClassName__balance, a process called name mangling. Only names that start with two underscores and do not end with two underscores are mangled. Names like __init__ stay unchanged, which makes private attributes harder to reach by accident.

Exam Block #5: Miscellaneous (List Comprehensions, Lambdas, Closures, and I/O Operations)

22% of the exam

What this topic covers

Create lists with comprehensions, use lambdas with map() and filter(), and define closures. Open and handle text or binary files with appropriate modes, streams, read and write methods, and OSError details such as errno.

When open() fails on a missing path, what errno value do you check?

The errno value is errno.ENOENT, which means no such file or directory. open() raises OSError, and in Python 3 this is usually FileNotFoundError, a subclass of OSError. Import errno and compare e.errno to errno.ENOENT.

Related Exams

Continue to Free PCAP-31-03 Exam Questions