PCAP course and practice exam: Certified Associate in Python Programming

This PCAP course has 31 video lessons and 117 graded labs, and its PCAP practice exam follows the official exam objectives: a 20-question sampler free with an account, the full question bank and timed mock exams with Pro.

Modules, exceptions, strings, object-oriented Python and more

Prepares you for PCAP-31-03: modules and packages, exceptions, strings, object-oriented programming, and comprehensions, lambdas, closures and file I/O.

Intermediate · 3 hours · 31 lessons · 118 labs

PCAP exam guide

The PCAP exam (PCAP – Certified Associate in Python Programming, by Python Institute (OpenEDG)): 65 minutes (plus 10 minutes NDA/tutorial); questions: 40 (by section: 6, 5, 8, 12 and 9); pass mark: 70% (cumulative); cost: from USD 295 (exam only); from USD 345 (exam + retake); from USD 359 (exam + retake + practice test).

  • Format: Single- and multiple-select, coding, scenario-based and interactive items; each item is worth up to 40 points and the raw score is normalised to a percentage
  • Duration: 65 minutes (plus 10 minutes NDA/tutorial)
  • Questions: 40 (by section: 6, 5, 8, 12 and 9)
  • Pass mark: 70% (cumulative)
  • Cost: From USD 295 (exam only); from USD 345 (exam + retake); from USD 359 (exam + retake + practice test)
  • Valid for: 5 years
  • Delivery: Pearson VUE testing centres and OnVUE online proctoring; or OpenEDG TestNow
  • Prerequisites: No formal prerequisites; PCEP certification recommended

Exam domains and weights

  • Modules and Packages: 12%
  • Exceptions: 14%
  • Strings: 18%
  • Object-Oriented Programming: 34%
  • Miscellaneous (List Comprehensions, Lambdas, Closures, I/O): 22%

A 20-question practice sampler is free with an account; Pro adds the full question bank and timed mock exams.

10 PCAP sample questions with answers: free to read, no account needed.

Common questions

How long is the PCAP exam?

The PCAP exam lasts 65 minutes (plus 10 minutes NDA/tutorial).

How many questions are on the PCAP exam?

40 (by section: 6, 5, 8, 12 and 9).

What is the PCAP passing score?

The pass mark is 70% (cumulative).

How much does the PCAP exam cost?

From USD 295 (exam only); from USD 345 (exam + retake); from USD 359 (exam + retake + practice test).

Is there a free PCAP practice test?

Yes. A 20-question practice sampler is free with an account; Pro adds the full question bank and timed mock exams.

Source: PCAP-31-0x Exam Syllabus (Python Institute) (Python Institute (OpenEDG)), checked 2026-10-03.

Who it is for

Intermediate level.

For Python programmers who hold PCEP, or finished the PCEP course here, and want the PCAP certificate. PCEP gives you loops, collections, functions and exceptions; PCAP adds modules, objects and files.

What you don't need yet:

What helps:

Before you start:

Take first:

Take next:

Learning paths:

Nobody needs to know everything before they start. Each course builds on the one before, so a learning path takes you there step by step.

What this exam proves, and what it doesn't

PCAP is an exam of select, coding, scenario and interactive items: passing shows you can write object-oriented Python. It doesn't show you can build and maintain real programs; our graded labs run Python in your browser.

Exam objectives this course teaches

PCAP – Certified Associate in Python Programming (PCAP-31-03)

Labs

118 labs, 117 of them graded: you write the code, it runs, and graded labs check the result. The outline lists each lesson's labs.

What is free

Start free: First module free with an account. Pro: Every course, lab, handbook, practice exam and certificate.

Course outline

Start Here

  1. The Class That Shared One List (4 labs): You can explain why two objects can share one list through a class variable, name the five PCAP-31-03 sections and their item counts, and predict a first set of associate-level traps.
  2. Sixty Five Minutes, Forty Items: How PCAP Is Run (3 labs): You can describe how PCAP-31-03 is delivered and scored, choose between Pearson VUE and TestNow, pace sixty five minutes across forty items with checkpoints, and read a class-heavy item from the question back.

Modules And Packages

  1. Import Variants, dir() And sys.path (6 labs): You can say which names each import form binds, predict what from-import-star brings in (with and without __all__), qualify names in nested modules, list a namespace with dir(), and extend sys.path to find a module.
  2. math, random And platform (4 labs): You can predict ceil, floor, trunc, factorial, hypot and sqrt including their types and errors, make random, choice and sample repeatable with seed, and read host facts with the platform functions the syllabus lists.
  3. Your Own Modules And Packages (4 labs): You can use __name__ to keep test code out of imports, predict how often a module's body runs, build a nested package with __init__.py files, qualify its modules, and explain __pycache__ and private module names.
  4. Modules Sprint (4 labs): You can answer mixed import, standard-library and package items at exam pace by writing down, for every import line, exactly which names it binds and which module bodies it runs.

Exceptions

  1. The Exception Family Tree (5 labs): You can place BaseException, Exception, SystemExit, KeyboardInterrupt, ArithmeticError, LookupError and the common built-in exceptions in the hierarchy and say which except clause catches what.
  2. Handlers, args, raise And assert (4 labs): You can order except branches and group exceptions in a tuple, trace else and finally, read an exception's args and its printed form, re-raise with a bare raise or raise ex, and use assert with a message.
  3. Exception Classes Of Your Own (5 labs): You can define custom exception classes on the right parent, build a small hierarchy and catch it by parent, give an exception extra data through super().__init__, override __str__, and fit a new class into existing handlers.
  4. Exceptions Sprint (4 labs): You can answer mixed exception items at exam pace by tracing the path of an exception: where it is raised, which handler matches first, and what else, finally and the exception's args contribute on the way out.

Strings

  1. Characters As Numbers (4 labs): You can explain ASCII, Unicode, code points and UTF-8, predict ord and chr results, count a string's characters versus its encoded bytes, and read escape sequences and raw strings.
  2. Comparing, Slicing And Never Changing (3 labs): You can predict string comparisons by code point, index and slice with negative indexes and steps, explain immutability, and use iteration, concatenation, repetition and the in and not in operators.
  3. String Methods The Exam Picks (4 labs): You can predict split with and without a separator, join, strip with a character set, find versus rfind versus index, the is methods on edge cases such as the empty string, and sorted on strings with and without a key.
  4. Strings Sprint (3 labs): You can answer mixed string items at exam pace by writing the string out with its index positions first, then applying each operation to that written copy.

Object-Oriented Programming

  1. Classes, Objects And Two Stacks (4 labs): You can explain class, object, property, method, encapsulation, inheritance, superclass and subclass, identify a class's components, and declare and invoke a constructor with and without default arguments.
  2. Class Variables, Instance Variables And __dict__ (4 labs): You can tell class variables from instance variables, read both through __dict__, predict shadowing when an object assigns a class variable's name, and explain private names and name mangling for instances and classes.
  3. Methods And The self Parameter (4 labs): You can declare and call methods, explain how self receives the object, predict the TypeError when self is missing or arguments are wrong, call one method from another through self, and use bound methods and returned values.
  4. Introspection: hasattr, __name__, __module__ And __bases__ (3 labs): You can use hasattr, getattr and setattr on objects and on classes and predict where they differ, read a class's __name__, __module__ and __bases__, and walk a class hierarchy at run time.
  5. Inheritance, super() And Polymorphism (3 labs): You can build a subclass, override methods including the constructor, call the parent constructor with super(), predict polymorphic calls through self, and tell is and is not from == on objects.
  6. Multiple Inheritance, The MRO And Diamonds (3 labs): You can predict which parent's method runs under multiple inheritance, write out the method resolution order of a diamond, trace super() along that order, and recognise a hierarchy Python refuses to build.
  7. Special Methods: __str__, __eq__ And Friends (4 labs): You can override __str__ and __repr__ and predict where each is used, give a class value equality with __eq__ and ordering with __lt__, and make objects work with len, + and in through __len__, __add__ and __contains__.
  8. Object-Oriented Sprint (3 labs): You can answer mixed object-oriented items at exam pace by sketching where each name lives (object, class or parent), the method resolution order, and which special method an operator calls.

Comprehensions, Lambdas, Closures And I/O

  1. List Comprehensions, Filtered And Nested (4 labs): You can read and write list comprehensions with a filtering if, a conditional expression, several for clauses and a comprehension inside another, and translate each into the equivalent loops.
  2. Lambdas, map() And filter() (3 labs): You can define lambdas with and without parameters and defaults, pass them to your own functions and to sorted, max, map and filter, and predict map and filter results including several iterables, None as a filter and a used-up iterator.
  3. Generators And Iterators (4 labs): You can use iter and next and explain StopIteration, write generator functions with yield and trace when their bodies run, use generator expressions as the lazy form of a list comprehension, and relate them to map and filter.
  4. Closures: Functions That Remember (4 labs): You can explain what a closure is and why it is useful, write function factories, keep private state with nonlocal, and predict late binding in loops and how a default argument fixes it.
  5. Streams, Handles And Open Modes (4 labs): You can explain streams versus handles, choose among the r, w, a, x and + open modes, tell text mode from binary mode and what each returns, and use the three predefined streams sys.stdin, sys.stdout and sys.stderr.
  6. read, readline, errno And bytearray (4 labs): You can predict read, read(n), readline, readlines and write on a file handle, iterate a file by lines, identify an OSError by its errno value (ENOENT, EISDIR, EACCES and others), and use a bytearray with readinto as an I/O buffer.
  7. Comprehensions, Closures And Files Sprint (3 labs): You can answer mixed items on comprehensions, lambdas, map and filter, generators, closures and file I/O at exam pace by asking two questions of every item: when does each value get computed, and what is left afterwards.

Mock And Review

  1. Twelve Traps, Mostly Objects (4 labs): You can recognise twelve recurring PCAP traps by their shape, from shared class lists and mangled names to late-binding lambdas and used-up iterators, and name the one check that defuses each before you trace.
  2. Mock, Review And Exam Day (3 labs): You can sit a timed forty-item mock on the PCAP pacing plan, score it by section weight, review it by marks lost, keep repeat mocks honest, and prepare the week before the exam.

Certification courses