Python Foundations
This course assumes no programming experience. Begin with the learning method, then progress through one connected sequence. Every published lesson and challenge belongs to that sequence.
Before you start
- Designed for: learners with little or no programming experience.
- You are ready when: you can use a browser and are willing to predict, run, explain, modify, quiz, and debug small examples. No mathematics prerequisite is assumed.
- Practice setup: begin with generated Colab notebooks. Unit 0 compares notebook and local workflows before later units introduce full projects.
- Assessment: lesson checkpoints diagnose understanding; each unit challenge asks you to integrate its ideas with assertions, hints, and debugging evidence.
What you will be able to do
- read Python syntax and trace values, state, decisions, loops, calls, and object relationships;
- choose representations for numbers, text, time, collections, files, and external records;
- turn requirements into small algorithms, functions, modules, packages, and classes;
- diagnose failures from tracebacks and controlled experiments;
- build a reproducible Git-backed project with a CLI and layered tests;
- improve behavior safely with typing, formatting, linting, quality gates, and refactoring; and
- guide readers with verified README, task, explanation, API, executable-example, Quarto, and publishing documentation.
Learning sequence
Python Foundations curriculum version 21 contains 16 units and 97 cohesive lessons. Each unit begins with an Overview and ends with a challenge.
| Unit | Focus | Outcome | Apply it |
|---|---|---|---|
| 0 | Get Started | Run and explain a small Python program, keep trustworthy evidence in a clean notebook, choose a suitable practice environment, diagnose common first-run problems, and use AI assistance without surrendering prediction or verification. | Challenge |
| 1 | Learning to Read and Write Python Code | Read a short program, trace how Python interprets it, format its structure clearly, document its decisions, and repair syntax errors systematically. | Challenge |
| 2 | Numbers, Text, and Other Values | Choose suitable Python values for counts, measurements, money, text, truth, missing information, and time; convert and format them deliberately; and explain important precision, parsing, and comparison boundaries. | Challenge |
| 3 | Organizing and Traversing Collections | Choose among lists, tuples, dictionaries, and sets from order, mutability, lookup, uniqueness, and data shape; traverse them safely; and sort or combine them without losing relationships. | Challenge |
| 4 | Making Decisions and Repeating Work | Turn written rules into complete, non-overlapping branches; use loops to transform, search, and traverse data; and explain how each loop progresses and stops. | Challenge |
| 5 | Building Reusable Functions | Design, call, compose, and trace reusable functions with clear parameters, returned results, documented contracts, and controlled side effects; pass behavior as data; and explain how recursive, lazy, closure-based, and decorated calls progress and finish. | Challenge |
| 6 | Sharing, Changing, and Copying Objects | Trace which names and containers share objects; distinguish equality, identity, rebinding, mutation, immutability, and hashability; choose shallow, selective, or deep copying from an explicit ownership contract; and design functions whose mutations or returned copies are deliberate and observable. | Challenge |
| 7 | Solving Problems with Algorithms | Turn an unclear task into explicit examples and rules; decompose it into checkable functions; select, trace, and adapt common algorithms; and defend correctness, boundary behavior, and practical time and memory costs. | Challenge |
| 8 | Errors, Exceptions, and Debugging | Classify syntax failures, runtime exceptions, and wrong results; read tracebacks across function calls; raise and handle only anticipated exceptions with useful context; and reproduce, inspect, isolate, repair, and verify a bug one evidence-backed hypothesis at a time. | Challenge |
| 9 | Files, Paths, and External Data | Locate files predictably, preserve text, translate external formats, validate records, and produce reproducible outputs with rejection evidence. | Challenge |
| 10 | Modules, Environments, and Python Projects | Discover reusable tools, design modules and package interfaces, version a src project, isolate dependencies, and prove a built wheel works outside its repository. |
Challenge |
| 11 | Object-Oriented Python and Dataclasses | Choose between functions, collections, dataclasses, and stateful classes; preserve valid state; compose replaceable collaborators; and reserve inheritance for honest behavioral subtypes. | Challenge |
| 12 | Command-Line Applications | Design a discoverable command, keep data and diagnostics in their proper channels, resolve settings safely, and connect a thin CLI adapter to reusable Python that can be checked directly and as a real process. | Challenge |
| 13 | Testing Python Programs | Turn behavioral contracts into focused pytest suites, interpret failures, isolate state and dependencies, choose evidence-producing boundaries, preserve regressions, and use generated examples without confusing passing tests or coverage with proof. | Challenge |
| 14 | Code Quality and Maintainability | Make Python projects easier to read and safer to change with consistent code, useful types, automated local/CI checks, and small behavior-preserving refactors. | Challenge |
| 15 | Documentation as Part of the Product | Design, write, test, build, and publish documentation that guides real readers from first contact to successful use, explains a stable public Python API, and remains trustworthy as the code changes. | Challenge |
Assessment and progress
Treat each lesson as a lab: predict, run, explain, modify, quiz, and debug. A unit challenge then asks you to select and combine ideas rather than repeat a lesson example. Unit 0 concludes with a methodology and setup quiz. The other challenges are designed for 60–120 minutes and provide a public contract, progressive checks, three hint levels, and a debugging-evidence record.
The progress dashboard is private, self-reported browser storage. It does not submit work, grade artifacts, verify identity, or issue credentials.
A Python Foundations final project and certificate are planned. Requirements, availability, and participation details will be announced soon.
Start learning
Begin with the learning method, then move through the units in order. Return to earlier evidence whenever a later task exposes a gap.