The PCEP-30-02 exam from Python Institute tests whether you can write and understand basic Python programs, work with core data types, apply control flow logic, define and call functions, and manipulate lists and other collections. It is the entry point for the Python Institute certification ladder, and passing it demonstrates a verified, vendor-neutral foundation in Python programming. Because the exam uses four question formatsβsingle-choice, multi-select, fill-in-the-blank, and drag-and-dropβyou need exposure to each type before test day.
This page provides a free printable PCEP practice test PDF you can download and study offline. Work through the questions, check your answers, and use the content sections and checklist below to fill any gaps in your Python knowledge before sitting for the official exam.
The first content domain of the PCEP exam covers the foundational rules of Python syntax and the concepts every programmer must understand before writing useful code. You need to know how Python uses indentation to define code blocks instead of braces, how to write and run a basic Python script, and what the interpreter does when it encounters a syntax error versus a runtime error versus a logical error. Exam questions in this area test your understanding of keywords, identifiers, literals, and operators. You should be able to read a short code snippet and predict its output, or identify the line that will cause an error.
Python supports arithmetic, comparison, assignment, logical, bitwise, and membership operators, and the PCEP exam tests all of them. Operator precedence questions are common: given an expression with mixed operators, what does Python evaluate first? You must also understand integer division (//) versus true division (/), the modulo operator (%), and the exponentiation operator (**). Logical operators (and, or, not) follow short-circuit evaluation rules that frequently appear in fill-in-the-blank questions. Practice writing small expressions by hand and verifying results in a Python interpreter until operator precedence becomes automatic.
The largest single content domain on PCEP is data types, variables, and input/output operations, which together account for roughly 29% of exam questions. Python's core data types include integers (int), floating-point numbers (float), strings (str), booleans (bool), and the NoneType. You need to understand how Python infers types dynamically, how to cast between types using int(), float(), and str(), and what happens when you try to perform an operation on incompatible types. Variable assignment in Python creates a binding between a name and an object; understanding that multiple names can reference the same object is essential for reasoning about code behavior, especially with mutable types.
Strings receive substantial coverage on the PCEP exam. You must know how to index and slice strings (remembering that indexing starts at 0 and negative indices count from the end), concatenate strings with the + operator, repeat strings with *, and check membership with in. String methods such as upper(), lower(), strip(), split(), replace(), and find() appear in multi-select questions. String formatting using both the % operator and f-strings is tested, and the exam may ask you to choose between formatting approaches or predict the output of a formatted string. Immutability is a key string property: attempting to assign to a character position raises a TypeError, and questions may test whether you know this.
Control flow and function definitions together account for another 29% of the PCEP exam. For control flow, you need to understand if/elif/else chains, for loops with range(), while loops with break and continue, and nested loop behavior. A common exam pattern presents a loop with a break inside a conditional and asks for the final value of a variable after the loop completes. You must trace through the logic carefully rather than relying on intuition. The range() function deserves particular attention: range(start, stop, step) does not include the stop value, and negative step values iterate in reverse.
Functions in Python are defined with the def keyword and can accept positional arguments, keyword arguments, and default parameter values. You need to understand the difference between parameters (in the function definition) and arguments (passed at the call site), and you must know how Python resolves variable names using the LEGB rule (Local, Enclosing, Global, Built-in). The global and nonlocal keywords modify scope behavior and appear on the exam. Return values are important: a function that reaches its end without a return statement implicitly returns None. Practice writing functions that accept various argument types and predict what each call returns, including calls with incorrect argument counts that raise TypeErrors.
The final content domain covers Python's built-in collection types. Lists are mutable ordered sequences; tuples are immutable ordered sequences; dictionaries are mutable mappings of keys to values. For lists, the exam tests indexing, slicing, append(), insert(), remove(), pop(), sort(), reverse(), and list comprehensions. List comprehensions are a concise and distinctly Pythonic pattern that frequently appear in drag-and-drop and fill-in questions. You must be able to both read and write comprehensions that include conditional expressions. Dictionaries require knowledge of key lookup, the keys(), values(), and items() methods, and the behavior when a key does not exist (KeyError versus the .get() default). Tuples are tested mainly through their immutability: knowing that tuples cannot be modified after creation is often the key to answering a question correctly.
Consistent daily practice with short coding exercises, combined with timed runs through the PDF questions, will prepare you for all four question formats on the official PCEP-30-02 exam. Focus extra time on any topic where you miss two or more PDF questions in a row, and use the FAQ below to clarify the distinctions that trip up most candidates. For full interactive practice with immediate answer feedback and detailed explanations, visit our pcep practice test page.