Courseiva
Free · No account needed · No credit card

Certified Associate Python Programmer PCAP Practice Test

421 questions with instant explanations, domain breakdown, and wrong-answer analysis. Built for the real exam.

Instant feedback after each answer
Full explanations included
Domain score breakdown
Real exam: 65 min
Pass mark: 70%

The vendor is retiring this exam on August 31, 2026.

You can still schedule and take PCAP until that date. See Python Institute's current PCAP exam version

Sample questions with explanations

This is exactly what you see during practice — question, options, and a full explanation after you answer.

Q1Exceptions and File I/Oeasy
Full explanation →

Which of the following statements about the `finally` block is true?

AIt executes only if no exception is raised.
BIt does not execute if a return statement is in try block.
CIt executes only if an exception is raised.
It always executes, regardless of exceptions.Correct

The `finally` block in Python is designed to always execute after the `try` and `except` blocks, regardless of whether an exception was raised or not. This includes cases where a `return`, `break`, or `continue` statement is executed in the `try` block, or even if an unhandled ex…Read full explanation

Q2Stringsmedium
Full explanation →

Which TWO of the following can be used to remove leading whitespace (spaces, tabs, newlines) from a string? (Choose exactly 2 correct answers.)

Arstrip()
lstrip()Correct
Ctrim()
Dclean()

The `lstrip()` method removes all leading whitespace characters (spaces, tabs, newlines) from the left side of a string. `strip()` removes leading and trailing whitespace, so it also satisfies the requirement of removing leading whitespace. Both are built-in string methods in Pyt…Read full explanation

Q3Exceptions and File I/Omedium
Full explanation →

A developer is implementing a custom exception for invalid data. Which class should the custom exception inherit from?

ARuntimeError
BArithmeticError
CBaseException
ExceptionCorrect

The `Exception` class is the base class for all built-in, non-system-exiting exceptions in Python. Custom exceptions should inherit from `Exception` (or one of its subclasses) to ensure they are caught by generic `except Exception:` handlers and integrate properly with Python's e…Read full explanation

What's covered

Questions are tagged by exam domain. Practice a specific domain or mix them all.

Untimed Practice

Answer at your own pace. Explanation and domain tag shown immediately after each answer.

Timed Practice

Countdown timer starts immediately. Results and domain scores shown at the end — just like the real exam.

Why practice here?

Full explanations on every question

Not just the right answer — you get exactly why each wrong option is wrong, so you learn the concept, not the answer.

Domain score breakdown

After each session see your score by exam domain so you know exactly where to focus study time.

100% free, forever

No subscription, no trial, no email wall. Start a session in under 10 seconds.

Exam-style questions

Scenario-based, precise wording, realistic distractors — written to match what you actually see on exam day.

← All PCAP questionsPCAP exam guideStudy guidePractice by domain