← Python Optional Level program
Advaslearning Hub · Curriculum reference

Python Optional Level — Full Lesson Plan

One topic at a time, taught from the ground up. If you can already write variables, input, operators, if/else and loops, you can start any of these ten sections today — they do not depend on each other, and they do not depend on finishing a level first.

All sectionsSection 1 · FunctionsSection 2 · ListsSection 3 · DictionariesSection 4 · File HandlingSection 5 · OOP ClassesSection 6 · Strings & TextSection 7 · Errors & DebuggingSection 8 · Comprehensions & IdiomsSection 9 · Tuples & SetsSection 10 · Modules, Packages & pip
24
Lessons written
10
Sections
36
Lessons planned
10
Projects & games
🛠️ Project
Section 1 · Functions

Write It Once, Use It Everywhere

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Your First Function: def and Calling ItGive a block of code a name, then use that name as often as you like.
02Parameters: Passing Data InOne function, many jobs — send it different values each time you call it.
03Return Values: Sending an Answer BackThe difference between a function that shows and one that gives — and why it matters.
04Default and Keyword ArgumentsSensible defaults, arguments named at the call, and the order rules that trip everyone.
05Scope: Where a Name LivesWhy the function cannot see your variable, and why that is a feature.
06Project: Your Own Function ToolboxSix functions, one menu, and a file you will reuse in every later project.🛠️ Project
Section 2 · Lists

Everything You Can Do to a List

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Access: Index, Negative Index, SlicingReach any item, count from the back, and take a run of items at once.
02Change: Assign, Insert, Replace a SliceLists are mutable — edit in place instead of rebuilding.
03Add & Remove: append, insert, pop, remove, delFive ways to grow and shrink a list, and when each is the right one.
04Search & Count: in, index, count, lenAsk a list what it holds without looping by hand.
05Sorting: sort vs sorted, reverse, key=Order a list by anything you like — length, price, last letter.
06Project: A CRUD List ManagerAdd, view, edit and delete — the four operations behind every app.🛠️ Project
Section 3 · Dictionaries

Labelled Storage

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Key–Value Pairs: [] vs get()Build your first dictionary, and look things up without crashing.⏳ Planned
02Change & Add: assignment, update, setdefaultOne syntax adds and edits — which is either handy or a trap.⏳ Planned
03Remove: pop, popitem, del, clearTake pairs out safely, and get the value back as you go.⏳ Planned
04Loop It: keys, values, items, inWalk a dictionary properly, and test membership before you read.⏳ Planned
05Nesting: Dictionaries Inside ListsOne dictionary per student, all of them in a list — how real data looks.⏳ Planned
06Project: A Phone Book You Can EditSearch, add, update and delete records — with no crash on a missing name.⏳ Planned🛠️ Project
Section 4 · File Handling

Make It Survive the Restart

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Reading a File: open and withThree ways to read, and the one line that closes the file for you.⏳ Planned
02Writing & Appending: "w" vs "a"Save text to disk — and know which mode wipes the file.⏳ Planned
03Line by Line: strip, split, and LoopsTurn a text file into data you can actually work with.⏳ Planned
04Records: Saving a Table of DataOne line per record, split by commas — a CSV by hand.⏳ Planned
05When the File Is Missingtry / except FileNotFoundError, and checking before you open.⏳ Planned
06Project: A Notebook That RemembersWrite notes, list them, delete one — all still there tomorrow.⏳ Planned🛠️ Project
Section 5 · OOP Classes

Your Own Kind of Thing

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Classes and Objects: The Blueprint IdeaOne class, many objects — and what that actually buys you.
02Attributes and __init__Give every object its own data at the moment it is created.
03Methods: Behaviour That Belongs to the ObjectFunctions with self, and why that first parameter is there.
04Many Objects, One ListBuild a list of objects and loop over it — the pattern behind every game.
05Inheritance and super()A new class that keeps everything the old one had, and changes one thing.
06Project: A Class-Based InventoryItems, quantities and behaviour in one place, instead of three lists.🛠️ Project
Section 6 · Strings & Text

Every Way to Handle Text

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Index and Slice: Reaching Into TextTake one letter or a run of them, counting from either end.
02Cleaning Up: strip, lower, upper, replaceMake messy typing safe to compare before your program trusts it.
03split and join: Text Becomes a ListTurn a sentence into words, work on the words, put it back together.
04f-strings: Building Readable OutputDrop values straight into text, and line up a column of $ prices.
05Searching & Checking: in, find, startswith, isdigitAsk text what it holds before you act on it — no crash, no guessing.
06Project: A Receipt FormatterMessy order lines in, a tidy aligned receipt out.🛠️ Project
Section 7 · Errors & Debugging

Read the Error, Fix the Bug

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Reading a TracebackThe last line names the problem, the rest tells you where it happened.⏳ Planned
02try / except: Catching What You ExpectHandle the failure you can see coming, and let the rest be loud.⏳ Planned
03The Five Errors You Will Actually MeetValueError, TypeError, IndexError, KeyError, ZeroDivisionError.⏳ Planned
04else, finally and Tidying UpRun something only when nothing failed — and something else regardless.⏳ Planned
05raise: Failing on PurposeReject bad data at the door instead of ten lines later.⏳ Planned
06Project: A Calculator That Never CrashesWhatever the user types, it answers or explains — it never dies.⏳ Planned🛠️ Project
Section 8 · Comprehensions & Idioms

Write It the Python Way

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01List Comprehensions: One Line, One LoopThe four-line loop that becomes one readable line.⏳ Planned
02Filtering: adding if Inside a ComprehensionBuild and filter in a single pass, without an empty list first.⏳ Planned
03enumerate and zipLoop with the index, or over two lists at once — no counter variable.⏳ Planned
04lambda, map and filterTiny throwaway functions, and where they beat writing a whole one.⏳ Planned
05Dictionary Comprehensions and sorted(key=)Reshape a dictionary, and sort anything by a rule you write.⏳ Planned
06Project: A Data Tidy-Up in Ten LinesTake a messy record list and clean, filter and sort it — compactly.⏳ Planned🛠️ Project
Section 9 · Tuples & Sets

The Other Two Containers

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01Tuples: The List That Cannot ChangeWhy a container you cannot edit is a feature, not a limitation.⏳ Planned
02Unpacking and Returning Several ValuesOne line for a, b = b, a — and functions that answer twice.⏳ Planned
03Sets: No Duplicates, No OrderThrow away repeats in one call, and test membership fast.⏳ Planned
04Set Maths: union, intersection, differenceWho is in both classes? Who is only in mine? One operator each.⏳ Planned
05Choosing: List, Tuple, Set or DictionaryFour containers, one decision — with the questions that settle it.⏳ Planned
06Project: A Duplicate FinderTwo name lists in; the repeats, the uniques and the overlap out.⏳ Planned🛠️ Project
Section 10 · Modules, Packages & pip

Split It Across Files

6 lessons · 6 hoursNo cert · Optional🗺️ Syllabus↗ Open lessons
CodeLessonTypeMilestone
01import: Using Code Somebody Else Wroterandom, math, datetime — batteries already included.⏳ Planned
02Your Own Module: One File, Many ProgramsMove your functions out, import them back, use them anywhere.⏳ Planned
03from ... import, aliases and Name ClashesThree ways to import, and the one that quietly overwrites things.⏳ Planned
04The __main__ Line, ExplainedWhy importing your file should not run it — and the one-line fix.⏳ Planned
05pip and Virtual EnvironmentsInstall a package for one project without touching the others.⏳ Planned
06Project: A Package of Your OwnThree modules, one folder, imported into a program that uses all three.⏳ Planned🛠️ Project
No lessons match your search.