DEV Community

ExamCert.App
ExamCert.App

Posted on

10 Things I Wish I Knew Before Taking the PCEP (PCEP-30-02)

Python Institute PCEP (PCEP-30-02)

I took the PCEP thinking "I know Python, this'll be a formality." I was half right. I passed, but not by the margin I expected, and every point I dropped came from the same place: not code I couldn't write, but code I misread under a timer.

If you're prepping for the PCEP-30-02 (Certified Entry-Level Python Programmer), the exam isn't testing whether you can build things. It's testing whether you know Python's rules cold — the stuff you'd normally just let the interpreter figure out for you. That distinction cost me more than I'd like to admit.

Before I get into the list: if you want to see this style of question before exam day instead of during it, run through some free PCEP practice questions. It's the fastest way to calibrate whether you're actually exam-ready or just "I use Python at work" ready. Those are not the same thing.

Here's what I wish someone had told me.

1. Operator precedence questions are not optional trivia

There will be a question that's just a wall of operators — something like 2 + 3 * 2 ** 2 % 5. No context, no function, just "what does this evaluate to." Python Institute loves these because they test whether you actually know the precedence table (** before unary minus before *///% before +/-) rather than just vibing your way through arithmetic.

print(2 + 3 * 2 ** 2 % 5)  # walk it: 2**2=4, 4%5=4, 3*4=12, 2+12=14
Enter fullscreen mode Exit fullscreen mode

Do a few of these by hand, on paper, no interpreter. If you catch yourself reaching for a REPL to check, that's the sign you need more reps.

2. Integer division and float division are different questions in disguise

/ always returns a float in Python 3, even 4 / 2 gives you 2.0. // is floor division and truncates toward negative infinity, not toward zero — which trips people up on negative numbers.

print(-7 // 2)   # -4, not -3
print(-7 % 2)    # 1, because Python's modulo follows the divisor's sign
Enter fullscreen mode Exit fullscreen mode

If you've mostly worked with positive numbers in real code, this is the exact spot where the exam will bite you.

3. List slicing has more variations than you think you need to memorize

list[start:stop:step] seems simple until they start throwing negative indices, negative steps, and omitted bounds at you in combination.

nums = [0, 1, 2, 3, 4, 5]
print(nums[::-1])     # reversed list
print(nums[1:-1])     # [1, 2, 3, 4]
print(nums[::2])      # [0, 2, 4]
Enter fullscreen mode Exit fullscreen mode

The exam will ask you to predict output, not write the slice yourself, which is harder. Practice reading slices, not just writing them.

4. Mutable default arguments are a classic gotcha, and PCEP knows it

This one shows up in slightly disguised forms. A function with a list or dict as a default parameter value keeps that same object across calls unless you're careful.

def add_item(item, basket=[]):
    basket.append(item)
    return basket

print(add_item("a"))  # ['a']
print(add_item("b"))  # ['a', 'b']  <- surprise
Enter fullscreen mode Exit fullscreen mode

You don't need to fix it on the exam, just predict the output correctly. Knowing why it happens (default args are evaluated once, at function definition time) is what gets you there.

5. global isn't about "does the variable exist," it's about "which one gets written to"

A function can read an outer-scope variable without any keyword. It's only when you try to assign to it that Python decides, at compile time, that the name is local — and then reading it before assignment throws UnboundLocalError. That's the part people don't see coming.

x = 10
def f():
    print(x)      # fine, reads global
    x = 20        # but this makes x local for the WHOLE function
f()  # UnboundLocalError, not 10
Enter fullscreen mode Exit fullscreen mode

The exam will test exactly this ordering trap. global x inside the function is what fixes it.

6. The exception hierarchy questions expect you to know what's a subclass of what

You'll get questions like "which exception should you catch to also catch IndexError and KeyError?" The answer path runs through LookupError. Same idea with ZeroDivisionError being a subclass of ArithmeticError, and basically everything eventually rolling up to Exception, then BaseException.

You don't need to memorize the entire tree, but know the common ones: LookupErrorIndexError/KeyError, ArithmeticErrorZeroDivisionError, and that except Exception catches nearly everything except things like SystemExit and KeyboardInterrupt.

7. Order of except blocks actually matters and the exam will test it

If you put a broad except Exception before a specific except ValueError, that second block is dead code — unreachable. PCEP will show you a stack of except clauses in the "wrong" order and ask what happens. Read top to bottom, most specific first, always.

8. The exam phrases questions to reward careful reading, not fast reading

A lot of PCEP questions are "select all correct statements" or "what will this code output" with four answers that differ by one character. This isn't a knowledge exam disguised as a reading exam — it genuinely rewards slowing down. I lost time re-reading questions I'd skimmed too fast the first pass. Read every line of code like it might contain the trick, because on this exam, it usually does.

9. Gap-fill and drag-drop questions test syntax memory you don't normally need

Because you're not in an IDE with autocomplete, questions that ask you to complete a for loop or pick the right keyword from a drag-and-drop bank expose gaps that don't matter day-to-day (like exact keyword order in try/except/else/finally, or whether it's elif not else if). Muscle-memory syntax, not conceptual understanding, is what gets tested here — so type out full programs by hand at least a few times during prep instead of only reading code.

10. Don't expect any OOP depth — but do expect solid coverage of collections

PCEP stays in the shallow end on object-oriented programming (that's PCAP's job). What it does go deep on: lists, tuples, dictionaries, sets, string methods, and how they behave differently — mutability, hashability, what you can and can't index into. If you're strong on functions and control flow but shaky on "when do I reach for a dict vs a set," that's worth another pass before exam day.

The format, briefly

PCEP-30-02 runs around 40 questions in roughly 45–50 minutes, mixing single-select, multiple-select, and gap-fill/drag-drop formats across basic syntax, data types, control flow, functions, data collections, and exceptions. It's proctored, closed-book, and moves fast if you're not fluent in reading code without running it.

One thing that helped me close the gap in my last week of prep: instead of just grinding practice questions and hoping I understood the wrong ones, I ran through sets on the ExamCert AI exam simulator, which explains why each answer is right or wrong on the spot. Way faster than googling every miss.

Good luck — and seriously, do the operator precedence drills. That's where I lost points I shouldn't have.

Top comments (1)

Collapse
 
topstar_ai profile image
Luis Cruz

I particularly appreciated the emphasis on operator precedence questions, like the example 2 + 3 * 2 ** 2 % 5, as it highlights the importance of understanding the precedence table. The suggestion to practice these by hand, without relying on an interpreter, is spot on - it's easy to get complacent with tools like REPL, but being able to reason through these manually is crucial. Have you found that practicing with paper and pencil helps to build a stronger mental model of how Python evaluates expressions, even in more complex scenarios?