DEV Community

ExamCert.App
ExamCert.App

Posted on

PCAP Study Guide 2026: The Four Topics That Decide PCAP-31-03

PCAP — Certified Associate in Python Programming

Every PCAP study guide 2026 I opened before booking told me the same four things: learn OOP, learn modules, learn exceptions, learn strings. Technically correct, entirely useless. Here is the version I would have wanted — what those four areas actually mean on the exam, and where working Python developers lose points on things they do correctly every day without thinking about them.

Because that is the strange part about PCAP. It is not hard. It is pedantic. And if you have written Python professionally for a few years, your intuition is the problem, not the solution.

The numbers first

PCAP-31-03 is the current version: 65 minutes, 70% to pass, and around $295 USD depending on region. It is the associate level of the Python Institute track, sitting above PCEP and below PCPP.

Sixty-five minutes is not much. That is the first thing to internalise. Several questions are code snippets you have to mentally execute, and mental execution is slow.

Topic 1: Modules and packages — where most people are weakest

Not because it is hard, but because in real work you type import pandas and never think about it again. The exam thinks about it constantly.

Things that actually get asked:

  • The difference between import module, from module import name, from module import *, and import module as alias — including what ends up in your namespace in each case.
  • sys.path and how Python finds a module.
  • The bytecode cache directory and .pyc files. Yes, really.
  • __name__ and the if __name__ == "__main__": idiom, and what __name__ equals in an imported module versus a run script.
  • What __init__.py does in a package.
  • The standard library bits they care about: math, random, platform, os, time.

random deserves a specific warning. Know random(), randint(a, b) (inclusive on both ends), randrange(a, b) (exclusive on the upper), choice(), sample(), and seed(). The inclusive/exclusive distinction between randint and randrange is exactly the kind of thing PCAP loves.

Topic 2: Exceptions — deeper than try/except

You know try/except. The exam wants the hierarchy.

BaseException at the top, then Exception, and below it the tree: ArithmeticError (parent of ZeroDivisionError), LookupError (parent of IndexError and KeyError), TypeError, ValueError, AttributeError, and so on.

Why does the hierarchy matter? Ordering. Given a chain of except blocks, which one catches? If except Exception: comes before except ZeroDivisionError:, the second is dead code and the exam will ask you what prints.

Also examinable:

  • else on a try block — runs only if no exception was raised. Underused in real code, always on the exam.
  • finally — runs regardless, including when the try block returns.
  • raise with no argument inside an except, which re-raises the current exception.
  • Custom exceptions and how inheritance affects what catches them.
  • The args attribute on an exception object.

Topic 3: Strings — the methods, precisely

This is the free-points topic and also the one people fumble, because they know roughly what each method does rather than exactly.

Know cold: split() vs join(), strip()/lstrip()/rstrip(), find() vs index() (find returns -1, index raises ValueError — a classic question), replace(), startswith()/endswith(), isalpha()/isdigit()/isalnum()/isspace(), upper()/lower()/title()/capitalize()/swapcase(), center()/ljust()/rjust(), count().

Plus: strings are immutable and every method returns a new one. Slicing with negative indices and steps, including the [::-1] reversal. ord() and chr(). And lexicographic comparison — "10" < "9" is True, which reads as a bug and is not.

Topic 4: OOP — the biggest domain

Roughly a third of the exam. What matters:

Name mangling. A single underscore is convention only. A double leading underscore triggers mangling to _ClassName__attr. The exam will show you an attempt to access a double-underscore attribute from outside the class and ask what happens.

Class vs instance attributes. The single most reliable trap in the entire exam. A mutable class attribute shared across instances, or an assignment inside a method that quietly creates an instance attribute shadowing the class one. If you learn one thing, learn this one.

Inheritance and MRO. Single and multiple inheritance, how Python resolves the method, super(), and the __mro__ attribute.

Introspection. isinstance() vs type(), issubclass(), hasattr(), getattr(), __dict__ on both instances and classes.

Magic methods. __init__, __str__ vs __repr__, __len__, __eq__, and what happens when you print an object that only defines one of __str__/__repr__.

Plus, filed under OOP by the syllabus but really their own thing: generators and closures. yield, generator expressions vs list comprehensions, lambda, map(), filter(), and closures capturing enclosing scope. Know that a generator is lazy and single-use — iterating it twice gives you nothing the second time.

How to actually study for it

Do not read. This is a code-tracing exam. Reading a study guide, including this one, builds recognition rather than the ability to say what a snippet prints.

The method that worked: take snippets, predict the output in writing, then run them. The writing matters — it stops you from retroactively deciding you knew. When you are wrong, you have found a real gap rather than a vague feeling.

Where do snippets come from? Practice questions, mostly. I went through ExamCert's free PCAP practice questions largely to harvest tracing exercises, and the explanations were the useful bit — on a code-output question, understanding why the other three outputs are wrong is what teaches you the rule. My error clustering was almost entirely class-versus-instance attributes and exception ordering, which I would never have guessed from feeling confident.

For the ones where I could see the answer but not the mechanism, ai.examcert.app explaining a snippet line by line was faster than me adding print statements, especially for MRO questions where the resolution order is the whole answer.

A three-week plan

  • Week 1. Modules, packages, and exceptions. Write small multi-file packages by hand. Deliberately raise and catch things in the wrong order.
  • Week 2. OOP. Build a small class hierarchy with multiple inheritance and inspect __mro__. Break the class-attribute trap on purpose so you have felt it.
  • Week 3. Strings, generators, closures, then timed practice blocks. Sixty-five minutes, no pausing.

The last thing

Turn off your professional instincts. In real work you would never write code that depends on randrange being exclusive on the upper bound, and you would use a linter that catches the class-attribute trap. PCAP is testing the language, not your judgement about it.

Answer what Python does, not what a sensible codebase would do. That reframing is worth more than another week of study.

Top comments (0)