Free PCEP Exam Flashcards

Memorize 50 essential terms and definitions for the OpenEDG PCEP — Certified Entry-Level Python Programmer (PCEP-30-02). See the term, recall the definition, then flip to check yourself.

50 Flashcards
13 Topics
100% Free
TermClick to flip

Interpreted vs compiled (Python)

Tap to reveal definition
Card 1 of 50Computer Fundamentals

Filter by Topic

Jump to Card

About These PCEP Flashcards

These 50 flashcards are designed to help you memorize key terms and definitions for the OpenEDG PCEP — Certified Entry-Level Python Programmer (PCEP-30-02). Each card shows a term on the front and its definition on the back—the classic flashcard format for vocabulary memorization. Use these alongside our practice questions to build both recall and comprehension.

Topics Covered

Computer Fundamentals5 cards
Data Types, Variables & Literals5 cards
Operators & Expressions5 cards
Input / Output3 cards
Control Flow — Conditionals4 cards
Control Flow — Loops5 cards
Data Collections — Sequences3 cards
Data Collections — Lists3 cards
Data Collections — Tuples2 cards
Data Collections — Dictionaries3 cards
Data Collections — Strings2 cards
Functions6 cards
Exception Handling4 cards

Complete Flashcard Reference

Review every term in this set. Open any term to reveal its definition.

Interpreted vs compiled (Python)

Python is an interpreted language: source code is read and executed line by line by the interpreter at runtime, rather than translated to a machine-code executable ahead of time. This makes errors surface only when the offending line runs.

Lexis, syntax, and semantics

Lexis = the valid words/tokens of the language; syntax = the rules for arranging tokens into valid statements; semantics = the meaning the code produces. Code can be syntactically correct yet semantically wrong.

Indentation as block structure

Python uses indentation (not braces) to define code blocks. Statements at the same indentation level belong to the same block. Inconsistent indentation raises IndentationError or TabError.

Comments in Python

A comment starts with # and runs to the end of the line; the interpreter ignores it. Python has no native multi-line comment syntax — a triple-quoted string used alone is a string literal, not a true comment.

Valid identifiers and keywords

Identifiers may contain letters, digits, and underscores but cannot start with a digit and cannot be a reserved keyword (e.g. if, for, def, True). Identifiers are case-sensitive: Value and value are different.

Numeral systems in Python literals

Integers can be written as decimal (10), binary (0b1010), octal (0o12), or hexadecimal (0xA). An underscore may separate digits for readability (1_000_000), and the prefixes are case-insensitive.

int vs float literals

A literal with no decimal point or exponent is an int; one with a decimal point (3.0) or exponent (3e2) is a float. Mixing int and float in arithmetic promotes the result to float.

bool is a subtype of int

True and False are the two Boolean values, and in Python True == 1 and False == 0. They can be used in arithmetic: True + True evaluates to 2.

Variables as references

A variable does not store a value directly; it is a name bound to an object. Assignment binds the name to an object. A variable must be assigned before it is used, or Python raises NameError.

Type casting: int(), float(), str()

int("12") returns 12; float("3.5") returns 3.5; str(12) returns "12". int("3.5") raises ValueError because the string is not a valid integer; convert via float() first.

/ vs // vs %

/ is true division and always returns a float (10 / 2 -> 5.0). // is floor division (rounds toward negative infinity). % is the remainder/modulo. 7 // 2 is 3; -7 // 2 is -4.

Exponentiation operator **

** raises to a power and is right-associative: 2 ** 3 ** 2 is 2 ** (3 ** 2) = 512, not 64. It has higher precedence than unary minus, so -2 ** 2 is -4.

Operator precedence order

From highest to lowest: ** , unary +/- , * / // % , + - , comparisons , not , and , or. Parentheses override precedence and should be used when in doubt.

Augmented assignment (x += 1)

x += 1 is shorthand for x = x + 1. Augmented forms exist for +, -, *, /, //, %, **. They require the target to already be defined, otherwise NameError is raised.

Bitwise operators

& AND, | OR, ^ XOR, ~ NOT, << left shift, >> right shift operate on integer bit patterns. x << 1 doubles x; x >> 1 halves it (floor). Do not confuse & with the logical and.

print() arguments: sep and end

print() joins its arguments with sep (default a single space) and appends end (default a newline \n). print(1, 2, sep='-', end='!') outputs 1-2! with no trailing newline.

input() always returns a string

input() reads one line from the console and returns it as a str, even if the user types digits. To do arithmetic you must cast it, e.g. int(input()) or float(input()).

String formatting: f-strings

An f-string prefixes the literal with f and substitutes expressions inside braces: f"{name} is {age}". Use {value:.2f} for two decimal places. f-strings, str.format(), and % all format strings.

Truthiness of values

In a Boolean context, 0, 0.0, empty string "", empty list [], empty tuple, empty dict, and None are falsy. Any non-zero number or non-empty collection is truthy.

if / elif / else

Only the first branch whose condition is true runs; remaining elif/else branches are skipped. else has no condition and runs only when every preceding test is false. elif avoids deeply nested ifs.

Short-circuit evaluation

and stops at the first falsy operand; or stops at the first truthy operand. The expression returns the operand that stopped evaluation, not necessarily True/False: 0 or 5 returns 5.

Conditional (ternary) expression

value = a if condition else b assigns a when condition is true, otherwise b. It is an expression that produces a value, unlike a full if statement.

while loop and sentinel pattern

A while loop repeats while its condition stays true; the condition is tested before each iteration. Forgetting to change the loop variable causes an infinite loop. A sentinel value signals when to stop.

range() boundaries

range(start, stop, step) yields values from start up to but not including stop. range(5) is 0..4. range(1, 10, 2) is 1,3,5,7,9. A negative step counts down; a zero step raises ValueError.

break vs continue

break exits the innermost loop immediately. continue skips the rest of the current iteration and jumps to the next one. Both affect only the nearest enclosing loop.

Loop else clause

A for/while loop may have an else block that runs only if the loop finished normally (no break). If the loop is exited by break, the else block is skipped.

pass statement

pass is a no-op placeholder that does nothing. It is used where Python syntactically requires a statement but no action is needed, such as an empty loop body or stub function.

Sequence indexing and negative indices

Index 0 is the first element; index -1 is the last. Accessing an index outside the valid range raises IndexError. Strings, lists, and tuples all support this indexing.

Slicing seq[start:stop:step]

Slicing returns a new subsequence from start up to but not including stop. Omitted bounds default to the ends. seq[::-1] reverses the sequence. Out-of-range slice bounds are clamped, not errors.

Mutable vs immutable types

Lists, dictionaries, and sets are mutable (can be changed in place). Strings, tuples, ints, and floats are immutable — operations on them create new objects rather than modifying the original.

List methods return None

append(), extend(), insert(), remove(), sort(), and reverse() modify the list in place and return None. Writing nums = nums.sort() discards the list and stores None.

List aliasing vs copying

b = a makes b another name for the same list, so changes through either name are visible in both. To get an independent copy use a[:] , list(a), or a.copy().

append() vs extend()

append(x) adds x as a single element (a list argument becomes one nested element). extend(iterable) adds each item of the iterable individually, growing the list by the iterable's length.

Tuples are immutable

A tuple cannot have items added, removed, or reassigned after creation. A single-element tuple needs a trailing comma: (5,). A tuple containing a list can still have that inner list mutated.

Tuple packing and unpacking

t = 1, 2, 3 packs values into a tuple; a, b, c = t unpacks them into variables. The number of targets must match the number of values unless a starred target collects the rest.

Dictionary keys must be unique and hashable

Dict keys must be immutable/hashable (str, int, tuple) — a list cannot be a key. Assigning to an existing key overwrites its value; keys themselves never duplicate.

Accessing dict values safely

d[k] raises KeyError if k is missing. d.get(k) returns None (or a supplied default) instead of raising. The in operator tests membership against keys, not values.

Iterating a dictionary

Iterating a dict directly yields its keys. Use .keys(), .values(), or .items() for explicit views; .items() yields (key, value) pairs. Insertion order is preserved in modern Python.

String immutability

Strings cannot be changed in place; methods like .upper(), .replace(), and .strip() return a new string and leave the original unchanged. s[0] = 'x' raises TypeError.

Common string methods

.split() breaks a string into a list on a delimiter; "-".join(list) joins items into one string; .find() returns an index or -1; .index() raises ValueError when not found.

Defining a function with def

def name(params): defines a function; calling it runs the body. A function that has no return statement (or a bare return) returns None implicitly.

Positional vs keyword arguments

Positional arguments are matched by order; keyword arguments are matched by name (func(b=2)). In a call, every positional argument must appear before any keyword argument.

Default parameter values

def f(x, y=10) makes y optional, using 10 when omitted. Parameters with defaults must come after parameters without defaults in the definition.

Local vs global scope (LEGB)

Name lookup follows Local, Enclosing, Global, Built-in order. A name assigned inside a function is local by default; use the global keyword to rebind a module-level variable from inside a function.

Shadowing a built-in or global

Assigning to a name that also exists globally creates a separate local variable; the global is unchanged unless declared global. Naming a variable list or str hides the built-in within that scope.

Recursion and the base case

A recursive function calls itself. It must have a base case that stops recursion; missing or unreachable base cases cause RecursionError when the call stack limit is exceeded.

try / except / else / finally

Code in try runs first; a matching except handles a raised exception; else runs only if no exception occurred; finally always runs (cleanup), whether or not an exception was raised.

Exception handler order

Python uses the first except clause whose exception type matches. Place specific exceptions before general ones; a bare except or except Exception placed first would catch everything and mask specifics.

Common built-in exceptions

ZeroDivisionError (divide by zero), ValueError (right type, bad value like int('x')), TypeError (wrong type), IndexError (bad sequence index), KeyError (missing dict key), NameError (undefined name).

raise statement

raise triggers an exception explicitly, e.g. raise ValueError("bad input"). Inside an except block, a bare raise re-raises the current exception so it propagates to an outer handler.

Frequently Asked Questions

What is the PCEP exam pass mark?

PCEP-30-02 requires a cumulative average score of at least 70% across all exam blocks. The exam has 30 questions to complete in 40 minutes, and results are provided immediately through the OpenEDG Testing Service. The exam fee starts at $69 USD and no firm sponsorship or prior programming experience is required.

Which PCEP topics are weighted most heavily?

PCEP-30-02 has four official blocks: Control Flow — Conditional Blocks and Loops is the largest at 29% (8 items), Functions and Exceptions is 28% (8 items), Data Collections — Tuples, Dictionaries, Lists, and Strings is 25% (7 items), and Computer Programming and Python Fundamentals is 18% (7 items). Prioritize loop tracing, branching, function call flow, and exception order.

Do I need programming experience for PCEP?

No. PCEP-30-02 is an entry-level certification with no formal prerequisites and no required prior programming experience. The Python Institute's free Python Essentials 1 (PE1) course on edube.org is the recommended preparation path, along with hand-tracing short Python 3 programs.

Does the PCEP certification expire?

No. PCEP-30-02 certification is valid for life and does not expire. Once you pass, the credential is permanent. Because Python continues to evolve (3.11, 3.12, 3.13+), staying current with new language features is still recommended for career growth.

How long should I study for the PCEP exam?

Most candidates need 30-60 hours of study over 4-8 weeks. With prior programming experience the time drops to roughly 20-30 hours; without experience plan for 50-80 hours. Effective preparation focuses on operator precedence, range boundaries, list mutability, dictionary keys, function return values, scope, and exception-handler order.

Same family resources

Explore More OpenEDG Python Institute Certifications

Continue into nearby exams from the same family. Each card keeps practice questions, study guides, flashcards, videos, and articles in one place.