Beginner Foundations
Variables, types, conditionals, loops, lists and functions — paced over 48 one-hour lessons packed with text-based games (Mad Libs, Rock-Paper-Scissors, Magic 8-Ball, Hangman, Text Adventures, Number Guesser), bug-hunt challenges and mini-projects.
01Welcome to Python: What Is Code?
Install Thonny / IDLE and run your very first program.
02Talking to the Computer
print()and writing comments.
03Boxes for Data: Variables & Names
Naming rules and storing values.
04Numbers, Math & Calculator Magic
Integers, floats,
%and**.
05Words & Letters: Strings 101
Quotes, joining and length.
06Mad Libs: Build Your First Word Game
Use variables and strings to make a silly story generator.
07Listening to the User:
input()Read text, convert to numbers.
08Making Choices:
if/else/elifIndentation and branches.
09True or False? Booleans & Comparisons
==,!=,<,>.
10Combining Choices
The logical operators
and,or,not.
11Mini-Game: Rock, Paper, Scissors
Combine
input,ifandrandomto beat the computer.
12Doing Things Again:
whileLoopsCounters and stop conditions.
13Counting Loops:
for&range()Iteration and step values.
14Loop Challenges: Patterns & Pictures
Draw triangles, squares and stars in ASCII art.
15Treasure Chests: Lists Introduction
Indexing,
append,len.
16List Iteration:
for item in listWalk through every item without an index counter.
17List Toolbox:
append,pop,remove,sortFive list methods you'll use every day.
18List Slicing & Negative Indices
list[1:3],list[-1],list[:]— picking a range.
19Random Deep Dive:
choice&shufflePick one item or reshuffle a whole list with
random.
20Game: Magic 8-Ball
A random answer-picker built from a list and
random.choice().
21Game: Lucky Draw Picker
Spin a hawker-stall menu and pick tonight's eat.
22Challenge: List Lab
Find the max, total, count and duplicates in a list — without using
max()at first.
23Strings Toolbox:
upper,lower,replace,countFour string methods that unlock most word-game logic.
24String Indexing & Slicing
Strings behave like lists of letters —
word[0],word[-1],word[::-1].
25Game: Anagram Detective
Sort the letters of two words and check if they match.
26Functions 101:
def& CallingWrap reusable steps in a named recipe.
27Function Parameters: Passing Data In
Send values to a function so it can do its job.
28Multiple Parameters & Default Values
Functions with two or more inputs, plus the
name="…"default trick.
29Function Returns: Sending Data Back
Use
returnto hand a value back to the caller.
30Functions Practice: Math Toolbox
Build
square,cube,averageandis_eventogether.
31Functions + Lists Together
Pass a list to a function and have it report back.
32Game: Quiz Engine — Part 1
Build a function that asks a question and checks the answer.
33Game: Quiz Engine — Part 2 (Score & Feedback)
Add a running score, encouragement messages and a final report.
34Challenge: Functions Decathlon
Ten timed mini-functions to write from scratch in 60 minutes.
35Game: Hangman Lite — Part 1 (Pick & Reveal)
Pick a secret word and show dashes for the unknown letters.
36Game: Hangman Lite — Part 2 (Lives & Win)
Track remaining lives and decide who wins.
37Game: Hangman Lite — Part 3 (ASCII Polish)
Draw the gallows step-by-step with multi-line strings.
38Project: ASCII Banner Generator
User types a name and the program prints it as big block letters.
39Game: Text Adventure — Part 1 (Map & Choices)
Branching scenes with nested
ifs — leave the village or stay?
40Game: Text Adventure — Part 2 (Inventory Lists)
Pick up items, drop them, check the bag — lists drive the inventory.
41Game: Text Adventure — Part 3 (Boss Fight)
HP, attacks and a
whilebattle loop with random damage.
42Challenge: Code Wars — Bug Hunt
Five broken scripts. Find each bug and patch it.
43Challenge: Code Wars — Predict the Output
Read tricky snippets and write down what they'll print before you run them.
44Challenge: Code Wars — Speed Round
Ten micro-problems against the clock.
45Game: Number Guesser — Part 1 (Core Loop)
Pick a secret 1–100, loop until the user guesses it.
46Game: Number Guesser — Part 2 (Difficulty Levels)
Easy / Medium / Hard change the range and the number of tries.
47Game: Number Guesser — Part 3 (Hi-Score Table)
Store the best three scores in a list and print the leaderboard.
48Capstone: Number Guessing Game Deluxe + L1 Recap
Bring every Level-1 skill into one polished game and review the level's headline ideas.
Data, Files & Tooling
Collections, strings, files, errors and modules — then a practical software toolkit: regular expressions, JSON, and visual programming with Turtle. Forty-eight one-hour lessons that turn code into real programs which read, save and process data, with multi-part games (Wordle-Lite, Tic-Tac-Toe, Turtle Race) along the way.
01Lists Deep Dive: Methods Recap
append,insert,remove,sort,reverse— the L1 list toolkit, used in anger.
02List Comprehensions Teaser
A 1-line preview of
[x*2 for x in nums]. Full deep-dive in L3.
03Locked Boxes: Tuples
Immutable ordered collections — and when to prefer them over lists.
04Tuple Unpacking & Multiple Return Values
a, b = (1, 2)and functions that return more than one thing.
05Labelled Storage: Dictionaries
Keys, values, lookups by name instead of by index.
06Dictionary Methods:
keys,values,itemsIterate a dict three different ways.
07Game: Secret Code Translator
Encode and decode messages with a key-value cipher.
08No Duplicates Allowed: Sets
Unique items, fast membership checks.
09Set Operations: union, intersection, difference
The maths-class operators, in code.
10Game: Word Bingo with Sets
Mark called words off a bingo card built from a set.
11Nested Worlds: Lists of Dicts
The shape every real dataset takes — students, products, scores.
12Nested Worlds: Dicts of Lists
Group items by category — drinks by stall, songs by genre.
13Challenge: Inventory Inspector
Query a nested data structure five different ways.
14String Superpowers
split,join,strip,find— the four most-used string methods.
15f-strings: Modern String Formatting
Embed values cleanly:
f"Hi {name}!".
16f-string Specifiers: Width, Decimals, Padding
{price:.2f},{name:>10}— receipts and tables.
17Game: Mad Libs 2.0 with f-strings
Rebuild the L1 Mad Libs game with cleaner formatting.
18Random Module: Dice, Cards & Coins
randint,choice,shuffle,sample.
19Game: Higher-or-Lower (Cards)
Deal from a shuffled deck and guess.
20Reading Files:
open()andwithRead text from a file the safe way.
21Writing Files: Saving Text to Disk
Append vs overwrite —
"a"vs"w".
22Game: High-Score Keeper (File-Backed)
Scores survive between runs.
23Game: Wordle-Lite — Part 1 (Load Word Bank)
Read 100 5-letter words from a file and pick a secret one.
24Game: Wordle-Lite — Part 2 (Feedback Logic)
Right letter right place, right letter wrong place, missing.
25Game: Wordle-Lite — Part 3 (Polish & Stats)
Six tries, ASCII colour codes, a final stats line.
26Error Handling:
try/exceptCatch crashes before they end the program.
27Specific Exceptions & Multiple
exceptBlocksCatch
ValueErrorseparately fromFileNotFoundError.
28finally&else: The Full Error FlowAlways-run cleanup and the happy-path block.
29Challenge: Error-Proof Calculator
Build a calculator that survives every weird user input you can think of.
30Importing from the Standard Library
import math,import statistics,from random import choice.
31Build Your Own Module
Save a function in one file, import it from another.
32Datetime Basics: Dates, Times, Deltas
Today's date, time differences, formatting with
strftime.
33Turtle Graphics: Drawing with Code
Your first visual program — forward, right, left, penup.
34Turtle: Loops & Patterns
Squares, stars, spirals — turtle + for loops.
35Turtle: Colours & Pen Control
RGB,
fillcolor,begin_fill/end_fill.
36Game: Turtle Race
Four turtles, randomness and a finish line.
37Game: Turtle Maze Walker
Arrow-key control to walk a turtle out of a maze.
38Project: Turtle Mandala Generator
User picks a number and gets a one-of-a-kind geometric pattern.
39Game: Tic-Tac-Toe — Part 1 (Board & Display)
A 3×3 nested-list board, printed cleanly each turn.
40Game: Tic-Tac-Toe — Part 2 (Win Detection)
Check rows, columns and the two diagonals.
41Game: Tic-Tac-Toe — Part 3 (Polish & Easy AI)
Random-move computer opponent and a play-again loop.
42Regex 101:
re.findallandre.searchFind every phone number in a wall of text.
43Regex Patterns: Character Classes & Quantifiers
\d,\w,+,*,?— the regex alphabet.
44Regex Project: Validators (email, IC, phone)
Build three validators that accept the real format and reject the fakes.
45JSON Files:
dump&loadSave and reload nested Python data as text.
46JSON Project: Quiz from a JSON File
Load questions from JSON, score answers, save high scores.
47Challenge: Code Olympics — Mixed Skills
Eight timed problems mixing every Level-2 skill.
48Capstone: Personal Notes & Tasks Manager
Build a CLI app that adds, lists, searches (regex) and saves (JSON) — your Level-2 toolkit, end-to-end.
OOP, Algorithms & Data Structures
Object-oriented design, generators, recursion, classic algorithms and your own data structures — taught through dungeon heroes, monster classes, fractal art, and a 48-lesson arc that ends with a Dungeon Quest capstone and the PCEP mock exam.
01Classes 101: Blueprints for Objects
What a class is, what an instance is, and how they differ.
02Attributes: Data Stored on an Object
Setting and reading instance attributes.
03Methods: Functions Attached to a Class
Defining a method,
self, and calling it.
04The
__init__ConstructorBorn ready: initialise an object's data when it's created.
05Many Objects from One Class
Build five heroes from one Hero class and store them in a list.
06Game: Dungeon Hero Class
A Hero with HP, attack and inventory — the L3 mascot is born.
07Inheritance: Child Classes
Reuse the parent class, extend the child.
08Method Overriding &
super()Customise inherited behaviour while still calling the parent's version.
09Game: Monster Family Tree
Goblin, Orc and Boss all inherit from Monster.
10Encapsulation & Private-ish Attributes
The
_underscoreconvention and why "private" in Python is a polite request.
11Polymorphism Basics
Same method name on different classes — write code that doesn't care which.
12Polymorphism Practice: A Shared Interface
Loop a list of mixed shapes and call .area() on each.
13Game: Monsters with Different Attacks
Each monster overrides .attack() — polymorphism in action.
14Dunder Methods Part 1:
__str__&__repr__Make
print(obj)show something useful.
15Dunder Methods Part 2:
__eq__&__lt__Compare and sort your own objects.
16Dunder Methods Part 3:
__add__&__len__Make
a + bandlen(obj)work for your class.
17Project: Pet Shop Inventory
Class
Pet+ list of pets + price lookup + total stock value.
18@property: Computed AttributesLooks like an attribute, runs like a method — read-only derived values.
19@staticmethod&@classmethodWhen the method doesn't need self — and when it needs the class itself.
20Lambda Functions
Tiny anonymous helpers —
lambda x: x * 2.
21List Comprehensions
One-line lists — the most beloved Pythonic syntax.
22Dict & Set Comprehensions
The same trick, applied to dicts and sets.
23Filtering Inside a Comprehension
[x for x in nums if x > 0]— the if-clause.
24Challenge: Score Leaderboards
Comprehensions +
sorted+lambdato rank players.
25map()&filter()Built-insThe original functional tools — and why comprehensions usually win.
26Iterators:
__iter__&__next__What a for-loop actually does behind the scenes.
27Generators with
yieldFunctions that pause, return a value, and pick up where they left off.
28Generators in Practice: Infinite Sequences
An infinite Fibonacci generator that doesn't blow up memory.
29Game: Lazy Enemy Spawner
A generator drips enemies into a battle one at a time.
30Challenge: Functional Olympics
Six problems solved with comprehensions, lambda and generators — no loops allowed.
31Recursion 101: Base & Recursive Cases
Functions that call themselves — and how to stop them.
32Recursion Practice: Factorial, Fibonacci, Powers
Three classic recursive functions, side by side with their iterative versions.
33Game: Recursive Art — Trees with Turtle
A self-similar tree that branches forever.
34Game: Recursive Art — Koch Snowflake
Add a bump to every line, repeat. A perfect snowflake emerges.
35Game: Recursive Art — Sierpinski Triangle
A triangle of triangles of triangles.
36Challenge: Recursion Lab
Five recursive problems — palindrome check, list flatten, directory walk and more.
37Searching: Linear Search
The simplest search — walk the list until you find it.
38Searching: Binary Search
Halve the list each guess — find an item in a million in twenty steps.
39Sorting: Bubble Sort
Swap neighbours until the list is in order.
40Sorting: Insertion Sort
Build the sorted list one card at a time, like a hand of cards.
41Sorting: Python's
sorted()withkeyWhy you'll almost never write your own sort in real code.
42Algorithm Complexity: Big-O Intuition
Why O(log n) beats O(n) beats O(n²), in human terms.
43Data Structures: Stacks (LIFO)
Push, pop — undo buttons, browser history, function call stacks.
44Data Structures: Queues (FIFO)
Enqueue, dequeue — print queues, task lists, breadth-first searches.
45Linked Lists Part 1:
NodeClass & TraversalBuild your own list out of nodes — see what Python's list hides.
46Linked Lists Part 2: Insert & Delete
Modify the chain without breaking it.
47Capstone: Dungeon Quest — OOP RPG
Hero, monsters, inventory, battle loop and a recursive maze — every L3 idea in one game.
48PCEP Exam Prep: Mock Exam & Review
Format walk-through, 10-question mock, weak-area review and a study plan.
Real-World Software & Databases
The level that opens job-shaped doors — JSON, CSV, REST APIs, web scraping, SQL & SQLite, pandas, matplotlib, Flask + auth. Forty-eight one-hour lessons, every project rooted in something a junior developer would actually be asked to build.
01JSON Files: Read & Write
json.load,json.dumpand pretty-printing.
02JSON: Nested Data & Pretty Output
Indented JSON, traversing lists-of-dicts, the
indent=kwarg.
03CSV Files: The Spreadsheet of Code
Read every row, every column, with the csv module.
04CSV Files: Writing & Updating Rows
Build a spreadsheet from Python data.
05Project: CSV ↔ JSON Converter
Pick a direction, transform the file, prove the round-trip works.
06Working with Dates & Times
datetime,strptime, deltas — real-world data is full of dates.
07Cleaning Messy Text Data
Strip whitespace, normalise case, handle missing fields.
08Challenge: Data Janitor
Take a deliberately broken CSV and ship it clean.
09APIs & the
requestsLibrarySend your first HTTP GET, read the JSON response.
10REST APIs: GET Requests Deep Dive
Query parameters, status codes, response headers.
11REST APIs: POST, Headers & Auth
Send data to a server; authenticate with an API key.
12Project: Trivia Quiz from a Real API
Live questions from Open Trivia DB.
13Project: Weather App for Cities
Pull live forecasts and print a friendly summary.
14Web Scraping: HTML Basics for Scrapers
Tags, attributes, the DOM tree — what BeautifulSoup walks.
15BeautifulSoup: Selecting Elements
find,find_all, CSS selectors.
16Project: Shop Price Tracker
Scrape a price page daily, log changes to a CSV.
17SQL Foundations:
SELECT,WHEREPick rows and columns from a sample DB.
18SQL:
ORDER BY&LIMITSort the answers, take only the top few.
19SQL:
GROUP BY& AggregatesCOUNT,SUM,AVG— summarise across rows.
20SQL:
INNER JOINCombine matched rows from two tables.
21SQL:
LEFT JOINKeep everything on one side, even when the other has nothing.
22SQLite with Python: the
sqlite3ModuleFrom the SQL shell into a Python script.
23SQLite CRUD: Create, Read, Update, Delete
The four verbs of every database app.
24Project: Library Management System
Books, members and loans across three tables.
25Pandas: Loading & Exploring DataFrames
read_csv,head,describe,info.
26Pandas: Selecting Rows & Columns
df['col'],df.loc,df.iloc.
27Pandas: Filtering with Boolean Masks
df[df['price'] > 10]and chained conditions.
28Pandas: Grouping & Aggregating
groupby+agg— pivot tables, in code.
29Pandas: Cleaning (NaN, dtypes, duplicates)
Most data is dirty. Most data work is cleaning.
30Pandas: Merging DataFrames
mergeon common keys — pandas's JOIN.
31Pandas: Sorting & Top-N Analysis
Who are the top 5? Which day was the worst?
32Challenge: Investigate a Real Dataset
Five questions you must answer from a real CSV.
33Matplotlib: Bar Charts
The chart you'll draw most often.
34Matplotlib: Line Charts & Time Series
Trends over weeks, months, years.
35Matplotlib: Pie & Scatter
Showing proportions; spotting correlations.
36Matplotlib: Subplots & Dashboards
Multiple charts in one figure — a one-page report.
37Project: Data Story — A 3-Chart Report
Pick a dataset, ask a question, answer it with three charts.
38Flask 101: Routes & Responses
Your first web app —
@app.route("/").
39Flask: HTML Templates with Jinja
Pass data from Python into HTML.
40Flask: Forms & POST Handling
Read what the user submitted.
41Flask + SQLite: Database-Backed Blog
Posts saved to disk, listed on the home page.
42Flask: User Sign-Up & Login
Password hashing with bcrypt, session cookies.
43Flask: Sessions & Logout
Keep someone logged in across requests.
44Flask: Deployment Walk-Through
Pick a host, push the code, get a public URL.
45Data Ethics & Storytelling
Bias in data; honest charts; what NOT to show.
46Statistics & Datetime Deep Dive (PCED-aligned)
mean,median,stdev, time-series — the maths PCED asks about.
47Capstone: Full-Stack Data Web App
Flask + SQLite + auth + a live dataset — your portfolio's first real project.
48PCED Exam Prep: Mock Exam & Review
Data-analysis exam orientation, 10-question mock, study plan.
Python for AI & Modern Apps
Machine learning with scikit-learn, neural networks with Keras, computer vision with OpenCV, NLP, and real apps powered by LLM APIs (Claude and GPT). Forty-eight one-hour lessons, every concept introduced with a plain-English analogy before the library call.
01Welcome to AI: What Can Computers Learn?
The big ideas behind machine learning, in plain English.
02AI vs ML vs Deep Learning: A Plain-English Tour
How the buzzwords actually fit together.
03The Data Mindset: Features & Labels
The two columns every ML problem starts with.
04NumPy Basics: Arrays & Vectorisation
Why ML runs on arrays, not Python lists.
05NumPy in Practice: An Image is an Array
Load a picture and treat its pixels as numbers.
06Pandas for AI: Preparing Data
From raw CSV to a model-ready DataFrame.
07Seaborn 101: Pretty Plots Fast
Spot patterns before you train.
08Seaborn Deep Dive:
pairplot,heatmap, distributionsThe three plots you'll lean on for every dataset.
09ML 101: Train, Test, Predict
The universal machine-learning recipe.
10Train-Test Split & Cross-Validation
Why you never test on the data you trained on.
11Accuracy, Precision, Recall
Reading a model's scorecard properly.
12Your First Classifier: K-Nearest Neighbours
Ask your 5 closest friends what to choose.
13Decision Trees: AI That Asks Questions
If-else, but learned from data.
14Random Forests: Many Trees, One Vote
Bagging in one paragraph; sklearn in two lines.
15Linear Regression: Predicting a Number
Fit a line, forecast a value.
16Logistic Regression: Predicting Yes/No
Same shape, classification output.
17Clustering: K-Means (Unsupervised)
Let the model find groups in your data.
18Feature Engineering: Making Data Usable
Encoding, scaling, dropping — the boring part nobody can skip.
19Project: Predict Titanic Survival
Your first complete ML pipeline.
20Project: Property Price Predictor
Real local data; fit, validate, present.
21Neural Networks 101: Neurons & Layers
From one perceptron to a multi-layer net.
22Activation Functions: ReLU, Sigmoid, Softmax
What makes a neural net actually learn.
23Build a Tiny Neural Net with Keras
Three layers, one prediction.
24Training a Neural Net: Loss & Optimisers
Gradient descent in pictures, not equations.
25Overfitting: When AI Memorises
How to spot it and how to fix it.
26Dropout & Regularisation
Two tricks that keep neural nets honest.
27Project: Handwritten Digit Recogniser (MNIST)
The classic neural-net hello-world.
28Project: Fashion Item Classifier
Train a model on 10 clothing categories.
29Image Classification with Pre-Trained Models
Use ResNet / MobileNet without training from scratch.
30OpenCV Basics: Load, Display, Resize, Filter
The four image operations you'll use most.
31Face Detection with Haar Cascades
Find faces in a photo with one library call.
32Webcam Streams with OpenCV
Read frames live and process them in a loop.
33Project: Smile Detector App
Smile at the camera; the app responds.
34NLP 101: Tokens, Stop-Words, Stemming
Teaching a computer what a 'word' is.
35Bag-of-Words & TF-IDF
Turn text into numbers the model can read.
36Sentiment Analysis
Is this review happy, sad or angry?
37Pattern-Matching Chatbot (No API Needed)
Rules, keywords, scripted replies — the chatbot of the 90s, today.
38Project: Cyberbullying Comment Filter
Train a classifier to flag harmful messages.
39LLM APIs: First Call to Claude / GPT
Send a prompt, parse the streaming response.
40Prompt Engineering: System vs User Prompts
Why the same question gives different answers.
41Few-Shot Prompting: Teach by Example
Hand the model 3 examples; it generalises from there.
42Tool Use: Letting the LLM Call a Function
The LLM picks the tool, your code runs it.
43Streaming LLM Responses
Print tokens as they arrive — feels alive.
44Project: Flask + LLM Chat App
Connect a real website to a real language model.
45RAG Lite: Search Your Notes with an LLM
Embed your text, retrieve the right chunk, ground the answer.
46AI Ethics: Bias, Fairness & Responsibility
The questions every AI builder must ask before shipping.
47Capstone: Your AI-Powered Application
Pick a real problem you care about; build the model + the UI.
- 48
PCEI Exam Prep: Mock Exam & Review
AI-exam orientation, 10-question mock, study plan.
Testing & Quality
The level that turns coders into engineers — unittest, pytest, fixtures, mocking, coverage, TDD, integration testing, linting and type checking. Forty-eight one-hour lessons, building real test suites for the games and apps from earlier levels.
01Why We Test: Real Bug Stories
From small typo to global outage — the cost of skipping tests.
02Testing Vocabulary
Static vs dynamic, black-box vs white-box, smoke vs regression.
03Testing Levels
Unit → integration → system → acceptance.
04Manual Testing & Test Cases
Designing thoughtful test cases on paper, before any code.
05Assertions in Python:
assertThe simplest test possible — a statement that must be true.
06Writing Your First Test Without a Framework
Just a plain script that crashes on failure.
07unittest: Python's Built-in FrameworkTestCase classes and your first green tick.
08unittest:assertEqual,assertRaises& FriendsThe dozen assertions you'll actually use.
09unittest:setUp&tearDownLifecycle hooks — set up once, run many.
10unittest: Test Suites & DiscoveryRun all your tests with one command.
11pytestIntro: Less BoilerplatePlain functions, plain asserts — why the industry loves it.
12pytest: Naming Rules & Discoverytest_*.py,test_*functions — the conventions matter.
13pytest: Smart Assert IntrospectionWhen a plain assert fails, pytest tells you why.
14pytestFixtures Part 1: Reuse Setup@pytest.fixture— your test data, ready to inject.
15pytestFixtures Part 2: Scope & Cleanupscope="module",yieldfor teardown.
16pytest: Parametrize One Test, Many Cases@pytest.mark.parametrize— table-driven testing.
17pytestMarkers:skip,xfail, customSkip slow tests; mark known failures; group tests by tag.
18Project: Test the L2 Tic-Tac-Toe Engine
A full pytest suite for the game you wrote in Level 2.
19Project: Test the L3 Dungeon Quest
Cover Hero, Monster, Battle and Inventory classes.
20Challenge: Find the Hidden Bugs
Five working-but-subtly-broken functions; write tests that catch every bug.
21Mocking 101: Why & When
Replace the slow / external bit with a stand-in.
22unittest.mock.Mock&MagicMockObjects that record everything done to them.
23Patching: the
@patchDecoratorSwap a real function for a fake one, for the test only.
24Mocking a Database
Test your CRUD code without touching SQLite.
25Mocking an HTTP API
Patch
requests.getso tests work offline.
26Challenge: Mock Olympics
Four tricky cases where mocks save the day.
27Coverage 101: What Lines Got Hit?
Track which lines your tests executed.
28pytest-cov: Measure & Visualise CoveragePer-file percentages and an HTML report you can browse.
29Coverage Targets: How Much Is Enough?
Why 100% is a trap, and what to aim for instead.
30TDD 101: Red → Green → Refactor
The three-step rhythm that changes how you write code.
31TDD Walk-Through: Build a Calculator Test-First
Watch a real test-driven build, step by step.
32TDD Project Part 1: Library Catalogue
Write the failing tests; make them pass.
33TDD Project Part 2: Library Catalogue Polish
Refactor under green tests; add search, filter, sort.
34Challenge: TDD a Mini-App
A 20-line spec; everyone TDDs it from scratch.
35Integration Testing Concepts
When unit tests aren't enough — testing how the parts talk.
36Testing a Flask App: The Test Client
Hit routes, assert on responses, no browser needed.
37Testing Database Code: Real DB vs Mock
The eternal trade-off — speed vs realism.
38Testing AI / ML Code
Determinism, seeds, what 'passing' even means for an ML model.
39End-to-End Testing Intro
Drive the real browser, click the real buttons.
40Project: E2E Test a Real Web App
playwright + pytest, the modern stack.
41Static Analysis:
ruffThe fastest linter in the Python world — install, run, fix.
42Static Analysis:
pylintDeeper, slower, opinionated — when you want the extra eyes.
43Code Formatting:
black&isortStop arguing about spaces; let the tool decide.
44Type Checking with
mypyCatch type bugs without running the code.
45Pre-commit Hooks: Stop Bad Code Before Commit
Run ruff, mypy and your tests automatically on every git commit.
- 46
CI Basics: GitHub Actions for pytest
Push the branch; the cloud runs your tests; you get a tick or a cross.
47Capstone: Bring a Real App to 90% Coverage
Take an existing repo (yours or a teammate's) and ship it with a real test suite.
- 48
PCET Exam Prep: Mock Exam & Review
Tester-exam orientation, 10-question mock, study plan.
Automation & DevOps
Save hours every week — file ops with pathlib, subprocess, scheduling, logging, web automation with Selenium / Playwright, email + Slack + Discord, scraping pipelines and SSH with paramiko. Forty-eight one-hour lessons, every project something a student could deploy to their own machine that night.
01Why Automate? ROI & Boring Tasks
Spotting the tasks worth automating — and the ones that aren't.
02Command-Line 101:
sys.argvThe simplest way to read arguments from the terminal.
03argparsePart 1: Positional & Optional ArgsReal CLI tools with -h help text for free.
04argparsePart 2: Subcommands & Defaultstool add,tool remove,tool list— git-style CLIs.
05pathlib: The Modern File-Path APIPathobjects beat string concatenation every time.
06pathlibin Practice: Find, Walk, GlobPath.rglob("*.csv")and friends.
07shutil: Copy, Move, Delete, ArchiveHigh-level file operations for whole folders.
08osModule: Environment & Working Directoryos.environ,os.getcwdand friends.
09subprocessPart 1: Run a Commandsubprocess.run()— the safe modern way.
10subprocessPart 2: Capture Output & Pipe Inputcapture_output=Trueand stdin piping.
11Datetime Deep Dive: Parse, Format, Arithmetic
strptime,strftime,timedelta.
12Timezone-Aware Datetime:
zoneinfoWhy MYT/UTC matters when your bot runs at midnight.
13Logging Part 1: Levels, Formatters, Handlers
Replace
printforever.
14Logging Part 2: File Logs & Rotation
Keep logs forever without filling the disk.
15CSV Automation: Merge & De-Dupe
Combine five files; drop duplicates by key column.
16Challenge: CSV Olympics
Six file-wrangling problems against the clock.
17JSON Automation: Validate & Transform
Walk nested JSON; check schemas; rewrite shapes.
18Excel Automation:
openpyxlReadOpen an .xlsx, read cells, traverse sheets.
19Excel Automation:
openpyxlWrite & StyleGenerate styled reports with borders, colours and formulas.
20PDF Automation:
pypdfRead & Extract TextPull text out of an invoice PDF.
21PDF Automation: Merge, Split, Watermark
Cut a 200-page PDF into chapters; stamp a footer on every page.
22Project: Multi-Format Report Generator
Take a CSV; output an Excel report, a PDF cover sheet and a JSON manifest.
23Web Scraping for Automation: Robust Selectors
Selectors that survive minor HTML changes.
24API Automation: Retries & Rate Limits
Back off and try again — the pipeline survives.
25API Automation: OAuth & Tokens
Authenticate to real-world APIs without leaking keys.
26Web Automation: Selenium Basics
Drive a real Chrome browser from Python.
27Web Automation: Playwright (Modern Alternative)
Async, faster, batteries-included.
28Project: Auto-Fill Form Bot
A bot that submits a daily form for you.
29Email Automation:
smtplib& MIMESend programmatic emails — politely.
30Email Automation: Attachments & HTML
PDF reports attached, styled message body.
31Notifications: Slack Webhooks
Post a message to a channel in three lines.
32Notifications: Discord Webhooks
Same idea, different platform — bridge them both.
33SMS Notifications via API (Twilio teaser)
When email isn't urgent enough.
34Project: Multi-Channel Alert System
Trigger → format → fan out to email + Slack + SMS.
35Scheduling: the
scheduleLibraryPure-Python "every day at 8am" — no cron needed.
36Scheduling: cron & Task Scheduler
Native OS schedulers — Linux/macOS cron and Windows Task Scheduler.
37File Watching:
watchdogReact to a file appearing in a folder, instantly.
38Backup & Sync Automation
Build your own mini Time Machine for one folder.
39Database Backup Automation
Dump SQLite / Postgres on a schedule; rotate old dumps.
40Project: Daily Report Bot
Scrape → transform → email at 8 a.m. every morning.
41SSH with
paramikoPart 1: Connect & RunRun a command on a remote server from your laptop.
42SSH with
paramikoPart 2: SFTP File TransferPush and pull files over SSH.
43Server Health Checks
Ping, disk-usage, CPU, memory — automate the basics with
psutil.
44Project: Server Maintenance Toolkit
A CLI that backs up, restarts, and reports on a remote box.
45Error Recovery in Long-Running Scripts
Retry, resume, skip — never crash a 4-hour pipeline an hour from done.
46DevOps Mindset: Idempotence, Logging, Alerts
The three habits that separate scripts from systems.
47Capstone: Workflow Orchestrator
A multi-step automation with logging, retries, reports and a Slack alert.
- 48
PCEA Exam Prep: Mock Exam & Review
Automation-exam orientation, 10-question mock, study plan.
Security & Cyber
Cybersecurity essentials — hashing & encryption, sockets & SSL, port scanning, system monitoring with psutil, the OWASP Top 10, secure coding, JWT/OAuth, secrets management and SSH with paramiko. Forty-eight one-hour lessons, every attack demoed in an isolated environment, every defence taught right after.
01Welcome to Security: CIA Triad & Ethics
Confidentiality, Integrity, Availability — plus rules of engagement.
02Threat Modelling: Think Like an Attacker
STRIDE in plain English; spot weak spots before they're exploited.
03Network Basics: TCP/IP, Ports, Protocols
How a packet travels from your laptop to a server.
04The OSI Model in One Hour
Seven layers, every one mapped to something a Python script touches.
05DNS & How URLs Resolve
From `google.com` to an IP address, step by step.
06Project: Passive Reconnaissance Toolkit
WHOIS, DNS lookups, public-record gathering — non-intrusive recon.
07Sockets in Python: TCP Client
The
socketmodule — your own networking from scratch.
08Sockets in Python: TCP Server
Accept connections, echo back, handle multiple clients.
09SSL/TLS: Secure Connections in Python
How HTTPS actually works under the hood.
10Project: Encrypted Chat Server
Client + server + TLS — a 50-line private chat.
11Hashing 101:
hashlibMD5, SHA-256 — one-way functions and why they matter.
12Why Hashing Matters: Password Storage
Never store passwords in plain text. Ever.
13Salting &
bcryptDeep DiveWhy "just hashing" isn't enough, and what
bcryptadds.
14Symmetric Encryption: Fernet
cryptography.fernet— one key encrypts and decrypts.
15Symmetric Encryption: AES Mode Comparison
ECB vs CBC vs GCM — why some modes are wrong.
16Asymmetric Encryption: Public & Private Keys
The maths behind every HTTPS handshake.
17Asymmetric in Practice: RSA Sign & Verify
Prove a message came from you without revealing the key.
18Project: Encrypted Message Vault
Save secrets to disk; decrypt only with the right password.
19Port Scanning: Concepts & Ethics
What scanning reveals and the laws around it.
20Project: Build a Port Scanner
Scan a host on YOUR network, report open ports — ethically.
21File Integrity Monitoring with Checksums
Detect when a file has been tampered with — even by one byte.
22System Monitoring with
psutilWatch processes, memory and disks live.
23Process Inspection & Anomaly Detection
Spot a process that shouldn't be there.
24Network Sniffing Basics (scapy teaser)
What goes across a wire — and why HTTPS exists.
25Log Analysis for Security
Find the needle (one suspicious login) in the haystack (10 000 lines).
26Challenge: Intrusion Detective
Given three log files, identify the attack and the affected accounts.
27OWASP Top 10 Tour
The classic web-app vulnerabilities — at a glance.
28A01 — Broken Access Control
When the wrong user reaches the wrong endpoint.
29A02 — Cryptographic Failures
Weak algorithms, default keys, leaked tokens.
30A03 — SQL Injection: The Attack
Show the exploit on a deliberately broken demo app.
31A03 — SQL Injection: The Defence
Parameterised queries — the only correct fix.
32A07 — XSS: Cross-Site Scripting Attack
How a comment field can take over a page.
33A07 — XSS: Defence (Sanitisation & CSP)
Output encoding and Content Security Policy.
34A05 — Security Misconfiguration
Default credentials, exposed admin panels, debug pages in prod.
35A08 — Software & Data Integrity Failures
Supply-chain attacks; what pinned dependencies actually buy you.
36Challenge: OWASP Bug Hunt
A deliberately vulnerable Flask app — find and patch four bugs.
37Authentication Basics: Sessions vs Tokens
How the web remembers who you are.
38JWT: Structure, Signing, Validation
The three dots; why never trust a JWT you didn't validate.
39OAuth 2.0: The Authorisation Code Flow
"Sign in with Google" demystified.
40Access Control: RBAC Patterns
Roles, permissions, and how to wire them up in Flask.
41Project: Add Auth + RBAC to a Flask App
Take the L4 blog and add admin / editor / reader roles.
42Secure API Design Checklist
Ten things every public API must get right.
43Subprocess Safely: Avoiding Command Injection
Why
shell=Trueis almost always wrong.
44Secrets Management: .env, Vaults, Key Rotation
Where keys go — and where they never should.
45Logging & Audit Trails for Forensics
Logs that hold up in an investigation — and the ones that don't.
46Security Reports: PDF, CSV, JSON Evidence
Generate handover documents your client can act on.
47Capstone: Vulnerability Scanner
Combine scanning, hashing, reporting and ethics into a deliverable tool.
- 48
PCES Exam Prep: Mock Exam & Review
Security-exam orientation, 10-question mock, study plan.