Cheat sheet

PCEP Certified Entry-Level Python Programmer Cheat Sheet

Practice this exam

Python Fundamentals

  • 18% of exam
  • Syntax Literals Operators I/O Input Trap

Control Flow

  • 29% of exam
  • Branches Loops Range Loop Else Flow Picker

Data Collections

  • 25% of exam
  • Lists Tuples Dictionaries Strings Collection Picker

Functions + Exceptions

  • 28% of exam
  • Functions Arguments Scope Exceptions Handler Picker

Quick Facts

  • Exam PCEP-30-02
  • Status Active until Aug 31 2026
  • Questions 30
  • Time 40 min + NDA
  • Pass 70%
  • Cost from $69
  • Validity Lifetime
  • Skill Trace Python code

Syntax vs Semantics FU

Syntax

  • Legal form
  • Checked before run

Semantics

  • Runtime meaning
  • May raise errors
  • Form vs behavior

Syntax FU

  • Lexis Tokens
  • Syntax Legal arrangement
  • Semantics Runtime meaning
  • Keyword Reserved word
  • Identifier Name token
  • Indentation Block structure
  • Comment Starts with #
  • PEP 8 Style guidance

/ vs // FU

/

  • True division
  • Returns float

//

  • Floor division
  • Rounds downward
  • Float vs floor

Literals FU

  • True Boolean true
  • False Boolean false
  • None No value
  • 3 Integer literal
  • 3.0 Float literal
  • 3e2 Scientific float
  • 'abc' String literal
  • 0b101 Binary literal
  • 0o10 Octal literal
  • 0x10 Hex literal

== vs is FU

==

  • Value equality
  • Usually compare data

is

  • Object identity
  • Use for None
  • Value vs identity

Operators FU

  • ** Power Right binds
  • / True division
  • // Floor division
  • % Remainder
  • + Add or concat
  • * Multiply or repeat
  • and First falsy
  • or First truthy
  • not Boolean invert
  • & | ^ Bitwise logic
  • << >> Bit shifts

I/O + Casting FU

  • print() Console output
  • sep= Join text
  • end= Finish text
  • input() Always string Trap
  • int() Integer conversion
  • float() Float conversion
  • str() String conversion
  • type() Inspect class

Range Stop CO

  • Range stops before the stop.
  • start included stop excluded step moves

break vs continue CO

break

  • Leaves loop
  • Skips loop else

continue

  • Next iteration
  • Loop can finish
  • Exit vs skip

Flow Picker CO

  • One condition → if
  • Fallback needed → else
  • Many branches → elif
  • Repeat while true → while
  • Iterate sequence → for
  • Count values → range()
  • Stop early → break
  • Skip iteration → continue

Branches CO

  • if First condition
  • elif Next condition
  • else Fallback branch
  • == Value equality
  • != Value inequality
  • < <= > Relational tests
  • 5 < x < 9 Chained comparison
  • Nested if Inner branch

Loop Else CO

  • Else means no break happened.
  • for else while else break blocks

Loops CO

  • while Condition loop
  • for Iteration loop
  • range(n) 0 to n-1
  • range(a,b) a to b-1
  • range(a,b,s) Step by s
  • break Exit loop
  • continue Next iteration
  • pass Do nothing
  • loop else No break only

Truthiness CO

  • 0 Falsy number
  • '' Falsy string
  • [] Falsy list
  • {} Falsy dict
  • () Falsy tuple
  • None Falsy singleton
  • nonzero Usually truthy
  • nonempty Usually truthy

Slice Shape CO

  • Slices copy start through before stop.
  • start included stop excluded step optional

List vs Tuple CO

List

  • Mutable
  • Methods mutate

Tuple

  • Immutable
  • Comma creates singleton
  • Changeable vs fixed

Collection Picker CO

  • Need mutation → list
  • Fixed sequence → tuple
  • Text sequence → str
  • Key lookup → dict
  • Missing default → get()
  • Add one item → append()
  • Add many items → extend()
  • Sorted copy → sorted()

Lists CO

  • list Mutable sequence
  • a[i] Index access
  • a[:] Shallow copy
  • append() Add one item
  • extend() Add many items
  • insert() Add before index
  • pop() Remove and return
  • sort() Mutates; returns None
  • sorted() Returns new list
  • del Delete target

append vs extend CO

append()

  • Adds one object
  • Nested list possible

extend()

  • Adds each item
  • Consumes iterable
  • Object vs items

Tuples + Strings CO

  • tuple Immutable sequence
  • (1,) One-item tuple
  • (1) Integer grouping
  • str Immutable text
  • s[i] Character access
  • s[a:b] Stop excluded
  • s[::-1] Reverse copy
  • strip() Trim ends
  • replace() New string

Dictionaries CO

  • dict Key-value mapping
  • {} Empty dict
  • d[k] May KeyError
  • get() Default possible
  • keys() Key view
  • values() Value view
  • items() Pair view
  • in d Checks keys
  • assign key Add or replace

Implicit None FU

  • No return means None.
  • print returns None pass returns nothing bare return None

print vs return FU

print()

  • Displays text
  • Returns None

return

  • Sends value
  • Exits function
  • Output vs value

Function Picker FU

  • Need reusable block → def
  • Need result → return
  • Optional value → default parameter
  • Positional extras → *args
  • Keyword extras → **kwargs
  • Outer assignment → global

Functions FU

  • def Define function
  • call Invoke function
  • parameter Definition name
  • argument Passed value
  • return Send result
  • no return Returns None
  • default Fallback argument
  • *args Tuple arguments
  • **kwargs Dict arguments
  • recursion Function calls itself

Parameter vs Argument FU

Parameter

  • Name in def
  • Receives value

Argument

  • Value in call
  • Passed to function
  • Slot vs value

Handler Picker FU

  • Bad type operation → TypeError
  • Bad converted value → ValueError
  • List index missing → IndexError
  • Dict key missing → KeyError
  • Math division zero → ZeroDivisionError
  • Name not found → NameError

Scope + Exceptions FU

  • local Inside function
  • global Module scope
  • shadowing Hides outer name
  • try Risky code
  • except Handler branch
  • else No exception
  • finally Always runs
  • raise Trigger exception
  • ValueError Bad value
  • TypeError Bad type
  • IndexError Bad index
  • KeyError Missing key

else vs finally FU

except else

  • No exception
  • After try succeeds

finally

  • Always runs
  • Cleanup block
  • Success vs always

Common Traps

input() Trap

  • Typed digits ≠ Returned string

Power Binding

  • 2 ** 3 ** 2 ≠ 2 ** 9

List Method Trap

  • sort mutates list ≠ sort returns None

Dictionary Membership

  • in checks keys ≠ not values

Tuple Singleton

  • (1,) is tuple ≠ (1) is int

Loop Else

  • normal finish ≠ not after break

String Mutation

  • strings immutable ≠ methods return copies

Handler Order

  • specific first ≠ broad last

Last Minute

  • 1. PCEP-30-02: 30 questions
  • 2. Pass threshold: 70%
  • 3. Control flow weighs 29%
  • 4. input() always returns str
  • 5. range stop is excluded
  • 6. break skips loop else
  • 7. List methods may return None
  • 8. Tuple singleton needs comma
  • 9. in dict checks keys
  • 10. No return means None
  • 11. == value; is identity
  • 12. Specific except before broad

OpenEDG PCEP — Certified Entry-Level Python Programmer

  • Practice Questions 100 questions Study Guide 24 topics Cheat Sheet 112 facts Flashcards 50 cards Videos 1 video Blogs 1 blog Free CE Podcast