← Python program
Advaslearning Hub · Curriculum reference

Python — Full Lesson Plan

An 8-level coding journey for ages 10–16, aligned with all 6 Python Institute entry-level certifications.From your first print("Hello!") to AI, automation and security.

All levelsLevel 1Level 2Level 3Level 4Level 5Level 6 · SpecialisationLevel 7 · SpecialisationLevel 8 · SpecialisationOptional · Pygame ZeroOptional · Pygame
432
Lessons written
10
Levels
48
Lessons planned
124
Projects & games
🎮 Game🧩 Challenge🛠️ Project📝 Exam prep
Level 1

Beginner Foundations

48 lessons · 48 hoursPrepares for · PCEP🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Welcome to Python: What Is Code?Install Thonny / IDLE and run your very first program.
02Talking to the Computerprint() and writing comments.
03Boxes for Data: Variables & NamesNaming rules and storing values.
04Numbers, Math & Calculator MagicIntegers, floats, % and **.
05Words & Letters: Strings 101Quotes, joining and length.
06Mad Libs: Build Your First Word GameUse variables and strings to make a silly story generator.🎮 Game
07Listening to the User: input()Read text, convert to numbers.
08Making Choices: if / else / elifIndentation and branches.
09True or False? Booleans & Comparisons==, !=, <, >.
10Combining ChoicesThe logical operators and, or, not.
11Mini-Game: Rock, Paper, ScissorsCombine input, if and random to beat the computer.🎮 Game
12Doing Things Again: while LoopsCounters and stop conditions.
13Counting Loops: for & range()Iteration and step values.
14Loop Challenges: Patterns & PicturesDraw triangles, squares and stars in ASCII art.🧩 Challenge
15Treasure Chests: Lists IntroductionIndexing, 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 Indiceslist[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-BallA random answer-picker built from a list and random.choice().🎮 Game
21Game: Lucky Draw PickerSpin a hawker-stall menu and pick tonight's makan.🎮 Game
22Challenge: List LabFind the max, total, count and duplicates in a list — without using max() at first.🧩 Challenge
23Strings Toolbox: upper, lower, replace, countFour string methods that unlock most word-game logic.
24String Indexing & SlicingStrings behave like lists of letters — word[0], word[-1], word[::-1].
25Game: Anagram DetectiveSort the letters of two words and check if they match.🎮 Game
26Functions 101: def & CallingWrap reusable steps in a named recipe.
27Function Parameters: Passing Data InSend values to a function so it can do its job.
28Multiple Parameters & Default ValuesFunctions with two or more inputs, plus the name="…" default trick.
29Function Returns: Sending Data BackUse return to hand a value back to the caller.
30Functions Practice: Math ToolboxBuild square, cube, average and is_even together.
31Functions + Lists TogetherPass a list to a function and have it report back.
32Game: Quiz Engine — Part 1Build a function that asks a question and checks the answer.🎮 Game
33Game: Quiz Engine — Part 2 (Score & Feedback)Add a running score, encouragement messages and a final report.🎮 Game
34Challenge: Functions DecathlonTen timed mini-functions to write from scratch in 60 minutes.🧩 Challenge
35Game: Hangman Lite — Part 1 (Pick & Reveal)Pick a secret word and show dashes for the unknown letters.🎮 Game
36Game: Hangman Lite — Part 2 (Lives & Win)Track remaining lives and decide who wins.🎮 Game
37Game: Hangman Lite — Part 3 (ASCII Polish)Draw the gallows step-by-step with multi-line strings.🎮 Game
38Project: ASCII Banner GeneratorUser types a name and the program prints it as big block letters.🛠️ Project
39Game: Text Adventure — Part 1 (Map & Choices)Branching scenes with nested ifs — leave the village or stay?🎮 Game
40Game: Text Adventure — Part 2 (Inventory Lists)Pick up items, drop them, check the bag — lists drive the inventory.🎮 Game
41Game: Text Adventure — Part 3 (Boss Fight)HP, attacks and a while battle loop with random damage.🎮 Game
42Challenge: Code Wars — Bug HuntFive broken scripts. Find each bug and patch it.🧩 Challenge
43Challenge: Code Wars — Predict the OutputRead tricky snippets and write down what they'll print before you run them.🧩 Challenge
44Challenge: Code Wars — Speed RoundTen micro-problems against the clock.🧩 Challenge
45Game: Number Guesser — Part 1 (Core Loop)Pick a secret 1–100, loop until the user guesses it.🎮 Game
46Game: Number Guesser — Part 2 (Difficulty Levels)Easy / Medium / Hard change the range and the number of tries.🎮 Game
47Game: Number Guesser — Part 3 (Hi-Score Table)Store the best three scores in a list and print the leaderboard.🎮 Game
48Capstone: Number Guessing Game Deluxe + L1 RecapBring every Level-1 skill into one polished game and review the level's headline ideas.🛠️ Project
Level 2

Data, Files & Tooling

48 lessons · 48 hoursPrepares for · PCEP🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Lists Deep Dive: Methods Recapappend, insert, remove, sort, reverse — the L1 list toolkit, used in anger.
02List Comprehensions TeaserA 1-line preview of [x*2 for x in nums]. Full deep-dive in L3.
03Locked Boxes: TuplesImmutable ordered collections — and when to prefer them over lists.
04Tuple Unpacking & Multiple Return Valuesa, b = (1, 2) and functions that return more than one thing.
05Labelled Storage: DictionariesKeys, values, lookups by name instead of by index.
06Dictionary Methods: keys, values, itemsIterate a dict three different ways.
07Game: Secret Code TranslatorEncode and decode messages with a key-value cipher.🎮 Game
08No Duplicates Allowed: SetsUnique items, fast membership checks.
09Set Operations: union, intersection, differenceThe maths-class operators, in code.
10Game: Word Bingo with SetsMark called words off a bingo card built from a set.🎮 Game
11Nested Worlds: Lists of DictsThe shape every real dataset takes — students, products, scores.
12Nested Worlds: Dicts of ListsGroup items by category — drinks by stall, songs by genre.
13Challenge: Inventory InspectorQuery a nested data structure five different ways.🧩 Challenge
14String Superpowerssplit, join, strip, find — the four most-used string methods.
15f-strings: Modern String FormattingEmbed 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-stringsRebuild the L1 Mad Libs game with cleaner formatting.🎮 Game
18Random Module: Dice, Cards & Coinsrandint, choice, shuffle, sample.
19Game: Higher-or-Lower (Cards)Deal from a shuffled deck and guess.🎮 Game
20Reading Files: open() and withRead text from a file the safe way.
21Writing Files: Saving Text to DiskAppend vs overwrite — "a" vs "w".
22Game: High-Score Keeper (File-Backed)Scores survive between runs.🎮 Game
23Game: Wordle-Lite — Part 1 (Load Word Bank)Read 100 5-letter words from a file and pick a secret one.🎮 Game
24Game: Wordle-Lite — Part 2 (Feedback Logic)Right letter right place, right letter wrong place, missing.🎮 Game
25Game: Wordle-Lite — Part 3 (Polish & Stats)Six tries, ASCII colour codes, a final stats line.🎮 Game
26Error Handling: try / exceptCatch crashes before they end the program.
27Specific Exceptions & Multiple except BlocksCatch ValueError separately from FileNotFoundError.
28finally & else: The Full Error FlowAlways-run cleanup and the happy-path block.
29Challenge: Error-Proof CalculatorBuild a calculator that survives every weird user input you can think of.🧩 Challenge
30Importing from the Standard Libraryimport math, import statistics, from random import choice.
31Build Your Own ModuleSave a function in one file, import it from another.
32Datetime Basics: Dates, Times, DeltasToday's date, time differences, formatting with strftime.
33Turtle Graphics: Drawing with CodeYour first visual program — forward, right, left, penup.
34Turtle: Loops & PatternsSquares, stars, spirals — turtle + for loops.
35Turtle: Colours & Pen ControlRGB, fillcolor, begin_fill / end_fill.
36Game: Turtle RaceFour turtles, randomness and a finish line.🎮 Game
37Game: Turtle Maze WalkerArrow-key control to walk a turtle out of a maze.🎮 Game
38Project: Turtle Mandala GeneratorUser picks a number and gets a one-of-a-kind geometric pattern.🛠️ Project
39Game: Tic-Tac-Toe — Part 1 (Board & Display)A 3×3 nested-list board, printed cleanly each turn.🎮 Game
40Game: Tic-Tac-Toe — Part 2 (Win Detection)Check rows, columns and the two diagonals.🎮 Game
41Game: Tic-Tac-Toe — Part 3 (Polish & Easy AI)Random-move computer opponent and a play-again loop.🎮 Game
42Regex 101: re.findall and re.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.🛠️ Project
45JSON Files: dump & loadSave and reload nested Python data as text.
46JSON Project: Quiz from a JSON FileLoad questions from JSON, score answers, save high scores.🛠️ Project
47Challenge: Code Olympics — Mixed SkillsEight timed problems mixing every Level-2 skill.🧩 Challenge
48Capstone: Personal Notes & Tasks ManagerBuild a CLI app that adds, lists, searches (regex) and saves (JSON) — your Level-2 toolkit, end-to-end.🛠️ Project
Level 3

OOP, Algorithms & Data Structures

48 lessons · 48 hoursCompletes · PCEP🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Classes 101: Blueprints for ObjectsWhat a class is, what an instance is, and how they differ.
02Attributes: Data Stored on an ObjectSetting and reading instance attributes.
03Methods: Functions Attached to a ClassDefining a method, self, and calling it.
04The __init__ ConstructorBorn ready: initialise an object's data when it's created.
05Many Objects from One ClassBuild five heroes from one Hero class and store them in a list.
06Game: Dungeon Hero ClassA Hero with HP, attack and inventory — the L3 mascot is born.🎮 Game
07Inheritance: Child ClassesReuse the parent class, extend the child.
08Method Overriding & super()Customise inherited behaviour while still calling the parent's version.
09Game: Monster Family TreeGoblin, Orc and Boss all inherit from Monster.🎮 Game
10Encapsulation & Private-ish AttributesThe _underscore convention and why "private" in Python is a polite request.
11Polymorphism BasicsSame method name on different classes — write code that doesn't care which.
12Polymorphism Practice: A Shared InterfaceLoop a list of mixed shapes and call .area() on each.
13Game: Monsters with Different AttacksEach monster overrides .attack() — polymorphism in action.🎮 Game
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 + b and len(obj) work for your class.
17Project: Pet Shop InventoryClass Pet + list of pets + price lookup + total stock value.🛠️ Project
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 FunctionsTiny anonymous helpers — lambda x: x * 2.
21List ComprehensionsOne-line lists — the most beloved Pythonic syntax.
22Dict & Set ComprehensionsThe same trick, applied to dicts and sets.
23Filtering Inside a Comprehension[x for x in nums if x > 0] — the if-clause.
24Challenge: Score LeaderboardsComprehensions + sorted + lambda to rank players.🧩 Challenge
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 SequencesAn infinite Fibonacci generator that doesn't blow up memory.
29Game: Lazy Enemy SpawnerA generator drips enemies into a battle one at a time.🎮 Game
30Challenge: Functional OlympicsSix problems solved with comprehensions, lambda and generators — no loops allowed.🧩 Challenge
31Recursion 101: Base & Recursive CasesFunctions that call themselves — and how to stop them.
32Recursion Practice: Factorial, Fibonacci, PowersThree classic recursive functions, side by side with their iterative versions.
33Game: Recursive Art — Trees with TurtleA self-similar tree that branches forever.🎮 Game
34Game: Recursive Art — Koch SnowflakeAdd a bump to every line, repeat. A perfect snowflake emerges.🎮 Game
35Game: Recursive Art — Sierpinski TriangleA triangle of triangles of triangles.🎮 Game
36Challenge: Recursion LabFive recursive problems — palindrome check, list flatten, directory walk and more.🧩 Challenge
37Searching: Linear SearchThe simplest search — walk the list until you find it.
38Searching: Binary SearchHalve the list each guess — find an item in a million in twenty steps.
39Sorting: Bubble SortSwap neighbours until the list is in order.
40Sorting: Insertion SortBuild the sorted list one card at a time, like a hand of cards.
41Sorting: Python's sorted() with keyWhy you'll almost never write your own sort in real code.
42Algorithm Complexity: Big-O IntuitionWhy 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: Node Class & TraversalBuild your own list out of nodes — see what Python's list hides.
46Linked Lists Part 2: Insert & DeleteModify the chain without breaking it.
47Capstone: Dungeon Quest — OOP RPGHero, monsters, inventory, battle loop and a recursive maze — every L3 idea in one game.🛠️ Project
48PCEP Exam Prep: Mock Exam & ReviewFormat walk-through, 10-question mock, weak-area review and a study plan.📝 Exam prep
Level 4

Real-World Software & Databases

48 lessons · 48 hoursCompletes · PCED🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01JSON Files: Read & Writejson.load, json.dump and pretty-printing.
02JSON: Nested Data & Pretty OutputIndented JSON, traversing lists-of-dicts, the indent= kwarg.
03CSV Files: The Spreadsheet of CodeRead every row, every column, with the csv module.
04CSV Files: Writing & Updating RowsBuild a spreadsheet from Python data.
05Project: CSV ↔ JSON ConverterPick a direction, transform the file, prove the round-trip works.🛠️ Project
06Working with Dates & Timesdatetime, strptime, deltas — real-world data is full of dates.
07Cleaning Messy Text DataStrip whitespace, normalise case, handle missing fields.
08Challenge: Data JanitorTake a deliberately broken CSV and ship it clean.🧩 Challenge
09APIs & the requests LibrarySend your first HTTP GET, read the JSON response.
10REST APIs: GET Requests Deep DiveQuery parameters, status codes, response headers.
11REST APIs: POST, Headers & AuthSend data to a server; authenticate with an API key.
12Project: Trivia Quiz from a Real APILive questions from Open Trivia DB.🛠️ Project
13Project: Weather App for Malaysian CitiesPull live forecasts and print a friendly summary.🛠️ Project
14Web Scraping: HTML Basics for ScrapersTags, attributes, the DOM tree — what BeautifulSoup walks.
15BeautifulSoup: Selecting Elementsfind, find_all, CSS selectors.
16Project: Shop Price TrackerScrape a price page daily, log changes to a CSV.🛠️ Project
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 sqlite3 ModuleFrom the SQL shell into a Python script.
23SQLite CRUD: Create, Read, Update, DeleteThe four verbs of every database app.
24Project: Library Management SystemBooks, members and loans across three tables.🛠️ Project
25Pandas: Loading & Exploring DataFramesread_csv, head, describe, info.
26Pandas: Selecting Rows & Columnsdf['col'], df.loc, df.iloc.
27Pandas: Filtering with Boolean Masksdf[df['price'] > 10] and chained conditions.
28Pandas: Grouping & Aggregatinggroupby + agg — pivot tables, in code.
29Pandas: Cleaning (NaN, dtypes, duplicates)Most data is dirty. Most data work is cleaning.
30Pandas: Merging DataFramesmerge on common keys — pandas's JOIN.
31Pandas: Sorting & Top-N AnalysisWho are the top 5? Which day was the worst?
32Challenge: Investigate a Real DatasetFive questions you must answer from a real Malaysian CSV.🧩 Challenge
33Matplotlib: Bar ChartsThe chart you'll draw most often.
34Matplotlib: Line Charts & Time SeriesTrends over weeks, months, years.
35Matplotlib: Pie & ScatterShowing proportions; spotting correlations.
36Matplotlib: Subplots & DashboardsMultiple charts in one figure — a one-page report.
37Project: Data Story — A 3-Chart ReportPick a dataset, ask a question, answer it with three charts.🛠️ Project
38Flask 101: Routes & ResponsesYour first web app — @app.route("/").
39Flask: HTML Templates with JinjaPass data from Python into HTML.
40Flask: Forms & POST HandlingRead what the user submitted.
41Flask + SQLite: Database-Backed BlogPosts saved to disk, listed on the home page.
42Flask: User Sign-Up & LoginPassword hashing with bcrypt, session cookies.
43Flask: Sessions & LogoutKeep someone logged in across requests.
44Flask: Deployment Walk-ThroughPick a host, push the code, get a public URL.
45Data Ethics & StorytellingBias 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 AppFlask + SQLite + auth + a live dataset — your portfolio's first real project.🛠️ Project
48PCED Exam Prep: Mock Exam & ReviewData-analysis exam orientation, 10-question mock, study plan.📝 Exam prep
Level 5

Python for AI & Modern Apps

48 lessons · 48 hoursCompletes · PCEI🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
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 TourHow the buzzwords actually fit together.
03The Data Mindset: Features & LabelsThe two columns every ML problem starts with.
04NumPy Basics: Arrays & VectorisationWhy ML runs on arrays, not Python lists.
05NumPy in Practice: An Image is an ArrayLoad a picture and treat its pixels as numbers.
06Pandas for AI: Preparing DataFrom raw CSV to a model-ready DataFrame.
07Seaborn 101: Pretty Plots FastSpot patterns before you train.
08Seaborn Deep Dive: pairplot, heatmap, distributionsThe three plots you'll lean on for every dataset.
09ML 101: Train, Test, PredictThe universal machine-learning recipe.
10Train-Test Split & Cross-ValidationWhy you never test on the data you trained on.
11Accuracy, Precision, RecallReading a model's scorecard properly.
12Your First Classifier: K-Nearest NeighboursAsk your 5 closest friends what to choose.
13Decision Trees: AI That Asks QuestionsIf-else, but learned from data.
14Random Forests: Many Trees, One VoteBagging in one paragraph; sklearn in two lines.
15Linear Regression: Predicting a NumberFit a line, forecast a value.
16Logistic Regression: Predicting Yes/NoSame shape, classification output.
17Clustering: K-Means (Unsupervised)Let the model find groups in your data.
18Feature Engineering: Making Data UsableEncoding, scaling, dropping — the boring part nobody can skip.
19Project: Predict Titanic SurvivalYour first complete ML pipeline.🛠️ Project
20Project: Malaysian Property Price PredictorReal local data; fit, validate, present.🛠️ Project
21Neural Networks 101: Neurons & LayersFrom one perceptron to a multi-layer net.
22Activation Functions: ReLU, Sigmoid, SoftmaxWhat makes a neural net actually learn.
23Build a Tiny Neural Net with KerasThree layers, one prediction.
24Training a Neural Net: Loss & OptimisersGradient descent in pictures, not equations.
25Overfitting: When AI MemorisesHow to spot it and how to fix it.
26Dropout & RegularisationTwo tricks that keep neural nets honest.
27Project: Handwritten Digit Recogniser (MNIST)The classic neural-net hello-world.🛠️ Project
28Project: Fashion Item ClassifierTrain a model on 10 clothing categories.🛠️ Project
29Image Classification with Pre-Trained ModelsUse ResNet / MobileNet without training from scratch.
30OpenCV Basics: Load, Display, Resize, FilterThe four image operations you'll use most.
31Face Detection with Haar CascadesFind faces in a photo with one library call.
32Webcam Streams with OpenCVRead frames live and process them in a loop.
33Project: Smile Detector AppSmile at the camera; the app responds.🛠️ Project
34NLP 101: Tokens, Stop-Words, StemmingTeaching a computer what a 'word' is.
35Bag-of-Words & TF-IDFTurn text into numbers the model can read.
36Sentiment AnalysisIs 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 FilterTrain a classifier to flag harmful messages.🛠️ Project
39LLM APIs: First Call to Claude / GPTSend a prompt, parse the streaming response.
40Prompt Engineering: System vs User PromptsWhy the same question gives different answers.
41Few-Shot Prompting: Teach by ExampleHand the model 3 examples; it generalises from there.
42Tool Use: Letting the LLM Call a FunctionThe LLM picks the tool, your code runs it.
43Streaming LLM ResponsesPrint tokens as they arrive — feels alive.
44Project: Flask + LLM Chat AppConnect a real website to a real language model.🛠️ Project
45RAG Lite: Search Your Notes with an LLMEmbed your text, retrieve the right chunk, ground the answer.
46AI Ethics: Bias, Fairness & ResponsibilityThe questions every AI builder must ask before shipping.
47Capstone: Your AI-Powered ApplicationPick a real problem you care about; build the model + the UI.🛠️ Project
48PCEI Exam Prep: Mock Exam & ReviewAI-exam orientation, 10-question mock, study plan.📝 Exam prep
Level 6 · Specialisation

Testing & Quality

48 lessons · 48 hoursCompletes · PCET🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Why We Test: Real Bug StoriesFrom small typo to global outage — the cost of skipping tests.
02Testing VocabularyStatic vs dynamic, black-box vs white-box, smoke vs regression.
03Testing LevelsUnit → integration → system → acceptance.
04Manual Testing & Test CasesDesigning 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 FrameworkJust 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.
11pytest Intro: 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.
14pytest Fixtures Part 1: Reuse Setup@pytest.fixture — your test data, ready to inject.
15pytest Fixtures Part 2: Scope & Cleanupscope="module", yield for teardown.
16pytest: Parametrize One Test, Many Cases@pytest.mark.parametrize — table-driven testing.
17pytest Markers: skip, xfail, customSkip slow tests; mark known failures; group tests by tag.
18Project: Test the L2 Tic-Tac-Toe EngineA full pytest suite for the game you wrote in Level 2.🛠️ Project
19Project: Test the L3 Dungeon QuestCover Hero, Monster, Battle and Inventory classes.🛠️ Project
20Challenge: Find the Hidden BugsFive working-but-subtly-broken functions; write tests that catch every bug.🧩 Challenge
21Mocking 101: Why & WhenReplace the slow / external bit with a stand-in.
22unittest.mock.Mock & MagicMockObjects that record everything done to them.
23Patching: the @patch DecoratorSwap a real function for a fake one, for the test only.
24Mocking a DatabaseTest your CRUD code without touching SQLite.
25Mocking an HTTP APIPatch requests.get so tests work offline.
26Challenge: Mock OlympicsFour tricky cases where mocks save the day.🧩 Challenge
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 → RefactorThe three-step rhythm that changes how you write code.
31TDD Walk-Through: Build a Calculator Test-FirstWatch a real test-driven build, step by step.
32TDD Project Part 1: Library CatalogueWrite the failing tests; make them pass.🛠️ Project
33TDD Project Part 2: Library Catalogue PolishRefactor under green tests; add search, filter, sort.🛠️ Project
34Challenge: TDD a Mini-AppA 20-line spec; everyone TDDs it from scratch.🧩 Challenge
35Integration Testing ConceptsWhen unit tests aren't enough — testing how the parts talk.
36Testing a Flask App: The Test ClientHit routes, assert on responses, no browser needed.
37Testing Database Code: Real DB vs MockThe eternal trade-off — speed vs realism.
38Testing AI / ML CodeDeterminism, seeds, what 'passing' even means for an ML model.
39End-to-End Testing IntroDrive the real browser, click the real buttons.
40Project: E2E Test a Real Web Appplaywright + pytest, the modern stack.🛠️ Project
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 CommitRun ruff, mypy and your tests automatically on every git commit.
46CI Basics: GitHub Actions for pytestPush the branch; the cloud runs your tests; you get a tick or a cross.
47Capstone: Bring a Real App to 90% CoverageTake an existing repo (yours or a teammate's) and ship it with a real test suite.🛠️ Project
48PCET Exam Prep: Mock Exam & ReviewTester-exam orientation, 10-question mock, study plan.📝 Exam prep
Level 7 · Specialisation

Automation & DevOps

48 lessons · 48 hoursCompletes · PCEA🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Why Automate? ROI & Boring TasksSpotting the tasks worth automating — and the ones that aren't.
02Command-Line 101: sys.argvThe simplest way to read arguments from the terminal.
03argparse Part 1: Positional & Optional ArgsReal CLI tools with -h help text for free.
04argparse Part 2: Subcommands & Defaultstool add, tool remove, tool list — git-style CLIs.
05pathlib: The Modern File-Path APIPath objects beat string concatenation every time.
06pathlib in Practice: Find, Walk, GlobPath.rglob("*.csv") and friends.
07shutil: Copy, Move, Delete, ArchiveHigh-level file operations for whole folders.
08os Module: Environment & Working Directoryos.environ, os.getcwd and friends.
09subprocess Part 1: Run a Commandsubprocess.run() — the safe modern way.
10subprocess Part 2: Capture Output & Pipe Inputcapture_output=True and stdin piping.
11Datetime Deep Dive: Parse, Format, Arithmeticstrptime, strftime, timedelta.
12Timezone-Aware Datetime: zoneinfoWhy MYT/UTC matters when your bot runs at midnight.
13Logging Part 1: Levels, Formatters, HandlersReplace print forever.
14Logging Part 2: File Logs & RotationKeep logs forever without filling the disk.
15CSV Automation: Merge & De-DupeCombine five files; drop duplicates by key column.
16Challenge: CSV OlympicsSix file-wrangling problems against the clock.🧩 Challenge
17JSON Automation: Validate & TransformWalk nested JSON; check schemas; rewrite shapes.
18Excel Automation: openpyxl ReadOpen an .xlsx, read cells, traverse sheets.
19Excel Automation: openpyxl Write & StyleGenerate styled reports with borders, colours and formulas.
20PDF Automation: pypdf Read & Extract TextPull text out of an invoice PDF.
21PDF Automation: Merge, Split, WatermarkCut a 200-page PDF into chapters; stamp a footer on every page.
22Project: Multi-Format Report GeneratorTake a CSV; output an Excel report, a PDF cover sheet and a JSON manifest.🛠️ Project
23Web Scraping for Automation: Robust SelectorsSelectors that survive minor HTML changes.
24API Automation: Retries & Rate LimitsBack off and try again — the pipeline survives.
25API Automation: OAuth & TokensAuthenticate to real-world APIs without leaking keys.
26Web Automation: Selenium BasicsDrive a real Chrome browser from Python.
27Web Automation: Playwright (Modern Alternative)Async, faster, batteries-included.
28Project: Auto-Fill Form BotA bot that submits a daily form for you.🛠️ Project
29Email Automation: smtplib & MIMESend programmatic emails — politely.
30Email Automation: Attachments & HTMLPDF reports attached, styled message body.
31Notifications: Slack WebhooksPost a message to a channel in three lines.
32Notifications: Discord WebhooksSame idea, different platform — bridge them both.
33SMS Notifications via API (Twilio teaser)When email isn't urgent enough.
34Project: Multi-Channel Alert SystemTrigger → format → fan out to email + Slack + SMS.🛠️ Project
35Scheduling: the schedule LibraryPure-Python &quot;every day at 8am&quot; — no cron needed.
36Scheduling: cron & Task SchedulerNative OS schedulers — Linux/macOS cron and Windows Task Scheduler.
37File Watching: watchdogReact to a file appearing in a folder, instantly.
38Backup & Sync AutomationBuild your own mini Time Machine for one folder.
39Database Backup AutomationDump SQLite / Postgres on a schedule; rotate old dumps.
40Project: Daily Report BotScrape → transform → email at 8 a.m. every morning.🛠️ Project
41SSH with paramiko Part 1: Connect & RunRun a command on a remote server from your laptop.
42SSH with paramiko Part 2: SFTP File TransferPush and pull files over SSH.
43Server Health ChecksPing, disk-usage, CPU, memory — automate the basics with psutil.
44Project: Server Maintenance ToolkitA CLI that backs up, restarts, and reports on a remote box.🛠️ Project
45Error Recovery in Long-Running ScriptsRetry, resume, skip — never crash a 4-hour pipeline an hour from done.
46DevOps Mindset: Idempotence, Logging, AlertsThe three habits that separate scripts from systems.
47Capstone: Workflow OrchestratorA multi-step automation with logging, retries, reports and a Slack alert.🛠️ Project
48PCEA Exam Prep: Mock Exam & ReviewAutomation-exam orientation, 10-question mock, study plan.📝 Exam prep
Level 8 · Specialisation

Security & Cyber

48 lessons · 48 hoursCompletes · PCES🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Welcome to Security: CIA Triad & EthicsConfidentiality, Integrity, Availability — plus rules of engagement.
02Threat Modelling: Think Like an AttackerSTRIDE in plain English; spot weak spots before they're exploited.
03Network Basics: TCP/IP, Ports, ProtocolsHow a packet travels from your laptop to a server.
04The OSI Model in One HourSeven layers, every one mapped to something a Python script touches.
05DNS & How URLs ResolveFrom `google.com` to an IP address, step by step.
06Project: Passive Reconnaissance ToolkitWHOIS, DNS lookups, public-record gathering — non-intrusive recon.🛠️ Project
07Sockets in Python: TCP ClientThe socket module — your own networking from scratch.
08Sockets in Python: TCP ServerAccept connections, echo back, handle multiple clients.
09SSL/TLS: Secure Connections in PythonHow HTTPS actually works under the hood.
10Project: Encrypted Chat ServerClient + server + TLS — a 50-line private chat.🛠️ Project
11Hashing 101: hashlibMD5, SHA-256 — one-way functions and why they matter.
12Why Hashing Matters: Password StorageNever store passwords in plain text. Ever.
13Salting & bcrypt Deep DiveWhy "just hashing" isn't enough, and what bcrypt adds.
14Symmetric Encryption: Fernetcryptography.fernet — one key encrypts and decrypts.
15Symmetric Encryption: AES Mode ComparisonECB vs CBC vs GCM — why some modes are wrong.
16Asymmetric Encryption: Public & Private KeysThe maths behind every HTTPS handshake.
17Asymmetric in Practice: RSA Sign & VerifyProve a message came from you without revealing the key.
18Project: Encrypted Message VaultSave secrets to disk; decrypt only with the right password.🛠️ Project
19Port Scanning: Concepts & EthicsWhat scanning reveals and the laws around it.
20Project: Build a Port ScannerScan a host on YOUR network, report open ports — ethically.🛠️ Project
21File Integrity Monitoring with ChecksumsDetect when a file has been tampered with — even by one byte.
22System Monitoring with psutilWatch processes, memory and disks live.
23Process Inspection & Anomaly DetectionSpot a process that shouldn't be there.
24Network Sniffing Basics (scapy teaser)What goes across a wire — and why HTTPS exists.
25Log Analysis for SecurityFind the needle (one suspicious login) in the haystack (10 000 lines).
26Challenge: Intrusion DetectiveGiven three log files, identify the attack and the affected accounts.🧩 Challenge
27OWASP Top 10 TourThe classic web-app vulnerabilities — at a glance.
28A01 — Broken Access ControlWhen the wrong user reaches the wrong endpoint.
29A02 — Cryptographic FailuresWeak algorithms, default keys, leaked tokens.
30A03 — SQL Injection: The AttackShow the exploit on a deliberately broken demo app.
31A03 — SQL Injection: The DefenceParameterised queries — the only correct fix.
32A07 — XSS: Cross-Site Scripting AttackHow a comment field can take over a page.
33A07 — XSS: Defence (Sanitisation & CSP)Output encoding and Content Security Policy.
34A05 — Security MisconfigurationDefault credentials, exposed admin panels, debug pages in prod.
35A08 — Software & Data Integrity FailuresSupply-chain attacks; what pinned dependencies actually buy you.
36Challenge: OWASP Bug HuntA deliberately vulnerable Flask app — find and patch four bugs.🧩 Challenge
37Authentication Basics: Sessions vs TokensHow the web remembers who you are.
38JWT: Structure, Signing, ValidationThe 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 PatternsRoles, permissions, and how to wire them up in Flask.
41Project: Add Auth + RBAC to a Flask AppTake the L4 blog and add admin / editor / reader roles.🛠️ Project
42Secure API Design ChecklistTen things every public API must get right.
43Subprocess Safely: Avoiding Command InjectionWhy shell=True is almost always wrong.
44Secrets Management: .env, Vaults, Key RotationWhere keys go — and where they never should.
45Logging & Audit Trails for ForensicsLogs that hold up in an investigation — and the ones that don't.
46Security Reports: PDF, CSV, JSON EvidenceGenerate handover documents your client can act on.
47Capstone: Vulnerability ScannerCombine scanning, hashing, reporting and ethics into a deliverable tool.🛠️ Project
48PCES Exam Prep: Mock Exam & ReviewSecurity-exam orientation, 10-question mock, study plan.📝 Exam prep
Optional · Pygame Zero

Visual Game Builder

48 lessons · 48 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01What Is Pygame Zero? Install & First WindowInstall pgzero, run an empty window, save the file.
02The Game Loop: draw() & update()How a game ticks — 60 times per second.
03Coordinates: Screen Origin & y-Axisx, y and why y goes downwards in graphics.
04Drawing Shapes: Rect, Circle, LineFilled and outlined primitives.
05Colours & BackgroundsRGB tuples, named colours, gradient hacks.
06Mini-Game: Doodle PadDraw with the mouse, clear with space.🎮 Game
07Actors: Your First SpriteLoad an image, place it on the canvas.
08Moving Actors: actor.x += 1The simplest way to push a sprite around.
09Velocity & Time-Based MovementWhy frame-rate-independent movement matters.
10Multiple Actors: Lists of SpritesSpawn many; update them all in a loop.
11Mini-Game: Cat ParadeTen cats walking in a line, each at its own speed.🎮 Game
12Challenge: 100 Sprites at 60 FPSSpawn 100 actors and keep the frame rate locked.🧩 Challenge
13Keyboard Input: Arrow KeysThe keyboard object — held vs pressed.
14Keyboard Input: Multiple Keys at OnceDiagonal movement, run + jump combos.
15Mouse Input: Click & Dragon_mouse_down, on_mouse_move, on_mouse_up.
16Mini-Game: Sky PainterPaint trails on the screen with the arrow keys.🎮 Game
17Mini-Game: Bug SquasherClick moving bugs before they escape.🎮 Game
18Mini-Game: Cat & Mouse ChaseWASD to dodge, score for survival time.🎮 Game
19Collision Detection: colliderectHave two rectangles overlapped this frame?
20Collision: collidepoint (Mouse on Actor)Did the user click on the right sprite?
21Collision Reactions: Bounce, Destroy, ScoreWhat to do when things touch.
22Mini-Game: Pong LiteTwo paddles, one ball, infinite rally.🎮 Game
23Mini-Game: Brick BreakerSmash a wall of bricks with a bouncing ball.🎮 Game
24Sprite Animation: Cycle FramesSwap costumes every few frames — a walking animation.
25Sprite Animation: Direction-Based FramesFace left, face right, face up — without flipping by hand.
26Sound Effects: sounds.boom.play()One-shot sounds that fire on event.
27Background Music with music.playLoop a track; fade in / fade out.
28Mini-Game: Falling Stars with SoundCatch the stars; chime on hit, thud on miss.🎮 Game
29Mini-Game: Drum MachineClick pads, schedule beats, play a loop.🎮 Game
30Score, Lives & Health BarsThe numbers every arcade game shows.
31Game States: Start → Play → Game OverA single state variable, branching draw and update.
32Saving High Scores to a FileTop 5 scores survive between sessions.
33Mini-Game: Asteroids Lite — Part 1 (Movement)Rotate, thrust, wrap around the screen.🎮 Game
34Mini-Game: Asteroids Lite — Part 2 (Game States)Start screen, play, game-over — and a hi-score table.🎮 Game
35Simple Physics: Gravity & JumpConstant downward acceleration; an impulse up.
36Bouncing & FrictionEnergy loss on each bounce; sliding to a stop.
37Mini-Game: Gravity CatcherCatch falling objects in a basket.🎮 Game
38Mini-Game: Endless Runner — Part 1 (Movement)Player runs; world scrolls; jump on spacebar.🎮 Game
39Mini-Game: Endless Runner — Part 2 (Obstacles)Procedurally spawn rocks and pits; score for distance.🎮 Game
40Tile-Based BackgroundsBuild a level out of 16×16 tiles.
41Scrolling BackgroundsParallax layers — clouds, hills, foreground.
42Multiple Levels & Difficulty CurvesProgressive challenge — speed and spawn rates.
43Particles: Explosions & TrailsSmall sprites with short lives — fireworks made of code.
44Screen Shake & Hit FlashesThe two tricks that make every hit feel solid.
45Title, Pause & Game Over ScreensThree more states; clean transitions; clear instructions.
46Challenge: Make Your Game Feel "Juicy"Take a working game; add shake, particles, sound polish.🧩 Challenge
47Capstone Part 1: Plan & Build Your Arcade GameChoose a genre, sketch the design, build the prototype.🛠️ Project
48Capstone Part 2: Polish & ShareAdd sound, score, juicy polish, and show it to your class.🛠️ Project
Optional · Pygame

Game Engineering

48 lessons · 48 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Pygame vs Pygame ZeroWhy go deeper, and what Pygame Zero hid from you.⏳ Planned
02Setting Up: pygame.init() & the Main LoopThe classic while running: pattern.⏳ Planned
03The Event System: Queue & PollingKeyboard, mouse, quit — all through one queue.⏳ Planned
04Display Surface & Drawing PrimitivesSurfaces, blits, and what actually gets drawn.⏳ Planned
05Coordinates & the Rect ObjectThe Swiss-army knife of Pygame geometry.⏳ Planned
06Loading & Drawing Imagesconvert_alpha, blit and image performance.⏳ Planned
07Sprites as Classes: Your First PlayerOOP applied — every entity is a class.⏳ Planned
08Sprite Class: Image, Rect & update()The three things every sprite must have.⏳ Planned
09Movement & Velocity VectorsSmooth movement using x/y velocity components.⏳ Planned
10Diagonal Speed NormalisationWhy diagonal moves shouldn't feel faster.⏳ Planned
11Sprite Groups: Many Objects, One UpdateGroup.update() and Group.draw().⏳ Planned
12Sprite Group Performance: Why Groups MatterSpawn 1,000 sprites; keep 60 FPS.⏳ Planned
13Collision: colliderectRectangle-vs-rectangle, the fast default.⏳ Planned
14Collision: spritecollide & groupcollideOne sprite vs a group; group vs group.⏳ Planned
15Collision: Pixel-Perfect MasksWhen rectangles aren't accurate enough.⏳ Planned
16Mini-Game: Top-Down Shooter — Part 1 (Player)Player class, movement, shooting bullets.⏳ Planned🎮 Game
17Mini-Game: Top-Down Shooter — Part 2 (Enemies & Bullets)Enemy spawner, sprite groups, collision resolution.⏳ Planned🎮 Game
18Mini-Game: Top-Down Shooter — Part 3 (Score & Game Over)HUD, hi-score table, restart loop.⏳ Planned🎮 Game
19Sprite Sheets: Slicing FramesOne PNG, many frames — load once, blit cheap.⏳ Planned
20Animation: Frame Timing with Delta-TimeAnimations that run at the same speed on every machine.⏳ Planned
21Animation: State Machine (Idle, Run, Attack)Pick the right animation for the current action.⏳ Planned
22Mini-Game: Animated Boss FightMulti-phase boss with sprite-sheet animations.⏳ Planned🎮 Game
23Tile Maps: Loading Levels from CSVA 2D grid of numbers → a 2D world of tiles.⏳ Planned
24Tile Maps: Loading from Tiled .tmxUse the Tiled editor; load the file in Python.⏳ Planned
25Camera & Scrolling: Follow the PlayerWhen the world is bigger than the window.⏳ Planned
26Camera: Smooth Lerp & Dead ZonesCameras that don't snap or jitter.⏳ Planned
27Parallax BackgroundsLayers that scroll at different speeds — instant depth.⏳ Planned
28Mini-Game: Side-Scroller — Part 1 (Movement & Camera)Player + tile map + smooth-follow camera.⏳ Planned🎮 Game
292D Physics: Gravity, Walking, JumpingVelocity, gravity, ground detection.⏳ Planned
302D Physics: Platform Collision ResolutionHow to stop the player from falling through floors.⏳ Planned
312D Physics: Wall Slides & Coyote JumpTwo tricks that make platformers feel right.⏳ Planned
32Mini-Game: Side-Scroller — Part 2 (Physics & Polish)Add gravity, jumps, collectibles and a goal.⏳ Planned🎮 Game
33Particle Systems: Basic Particle ClassA short-lived sprite with velocity and a fade-out.⏳ Planned
34Particle Systems: Emitters & Object PoolsSpawn thousands without allocating thousands.⏳ Planned
35Mini-Game: Particle Showcase (Fireworks)Click to launch; explode in colour.⏳ Planned🎮 Game
36Scene Management: Stack-Based State MachinePush a pause scene; pop it back to the game.⏳ Planned
37HUD: Score, Health, Mini-MapDrawing on top of the world.⏳ Planned
38UI: Buttons & Menus from ScratchClick areas, hover states, keyboard navigation.⏳ Planned
39Title → Game → Pause → Game Over FlowFour scenes, clean transitions, no leaks.⏳ Planned
40Settings Screen: Volume & ControlsKeybinds the player can change at runtime.⏳ Planned
41Sound Mixer: Music + SFX ChannelsBackground music, layered effects, master volume.⏳ Planned
42Sound Mixer: Channel ManagementReserve channels so important sounds aren't cut off.⏳ Planned
43Saving Progress: JSON + PygameHigh scores, settings, and a continue button.⏳ Planned
44Save Slots: Multiple Save FilesThree saves; load, overwrite, delete.⏳ Planned
45Performance: FPS Counter & ProfilingMeasure before you optimise; show FPS in the HUD.⏳ Planned
46Performance: Dirty-Rect Drawing & Surface Re-UseTwo tricks that double the frame rate on slow machines.⏳ Planned
47Capstone Part 1: Design & BuildChoose a genre, plan the game, ship a playable prototype.⏳ Planned🛠️ Project
48Capstone Part 2: Polish, Test & ShipParticles, sound, save system, and a public release.⏳ Planned🛠️ Project
No lessons match your search.