No prerequisites · 4 milestones · 16 units · 97 lessons · Free to study
Active study: 388–556 hours, at your own pace.
Start Unit 0 Explore the units
Start with small programs in your browser. Progress through the language, then build Python projects with files, packages, command-line tools, tests, and documentation. This is a substantial course: take one lesson at a time.
0%course work recorded
0/97lessons
0/20unit and milestone challenges
117 course activities remaining
Course in progress
What you will learn
- Read, write, and explain Python programs.
- Work with values, collections, functions, objects, and files.
- Find bugs and check that your programs behave as intended.
- Build, test, document, and share practical Python projects.
Milestone sequence
Each milestone combines its units in an ungraded challenge. Complete the unit challenges as you go, then use the milestone challenge to connect those skills. Progress is self-reported in this browser on this device.
Before you start
You only need a browser to begin; no programming or mathematics prerequisite is assumed.
Practice setup: start in Colab, then learn local workflows for larger projects. Lessons combine explanations, runnable examples, checkpoints, and a lab. Each unit ends with a challenge that brings its ideas together.
Learning sequence
Python Foundations curriculum version 22 contains 16 units and 97 cohesive lessons, grouped into 4 milestones. Each unit begins with an Overview and ends with a challenge. Each milestone ends with a separate challenge connecting its units: 16 unit challenges and 4 milestone challenges.
00Get StartedRun your first program and choose a reliable practice workflow.5 lessons
Unit overview · Unit challenge
- Meet Python Through a Tiny Program
- Learn with Predictions and Evidence
- Use AI While Keeping the Thinking Yours
- Work Reliably in Colab and Jupyter
- Build a Dependable Local Python Workspace
01Learning to Read and Write Python CodeRead Python instructions and repair common syntax errors.7 lessons
Unit overview · Unit challenge
- Values, Names, and Assignment
- Expressions, Statements, and Execution Order
- Python’s Words and Symbols
- Indentation and Code Blocks
- Writing Python Across Multiple Lines
- Comments and Docstrings That Help
- Reading and Fixing Syntax Errors
02Numbers, Text, and Other ValuesChoose, convert, and format numbers, text, truth values, and time.8 lessons
Unit overview · Unit challenge
- Values, Types, Conversion, and None
- Integers and Everyday Arithmetic
- Floating-Point Numbers and Precision
- Money, Exact Ratios, and Complex Numbers
- Strings and Unicode Text
- Input, Output, and Clear Formatting
- Booleans, Comparisons, and Truth
- Dates, Times, and Durations
03Organizing and Traversing CollectionsOrganize data and work through collections without losing relationships.7 lessons
Unit overview · Unit challenge
- Lists: Keeping Values in Order
- Tuples and Unpacking Fixed Records
- Dictionaries: Finding Values by Key
- Sets: Uniqueness and Group Comparisons
- Visiting Items in a Collection
- Sorting Collections Without Losing Meaning
- Building and Reading Nested Data
04Making Decisions and Repeating WorkTurn rules into decisions and repeat work with loops.8 lessons
Unit overview · Unit challenge
- Choosing a Path with
if, elif, and else
- Combining Conditions Without Surprises
- Turning Rules into Complete Decisions
- Building Results with
for Loops
- Repeating Until Something Changes
- Searching, Skipping, and Stopping Loops
- Working Through Grids and Pairs
- Building Collections with Comprehensions
05Building Reusable FunctionsBuild functions with clear inputs, results, and behavior.8 lessons
Unit overview · Unit challenge
- Defining Functions and Returning Useful Results
- Designing Clear Parameters and Calls
- Breaking a Program into Small Functions
- Following Names Through Function Calls
- Passing Functions as Values
- Solving Smaller Problems with Recursion
- Producing Values One at a Time
- Adding Behavior with Decorators
06Sharing, Changing, and Copying ObjectsUnderstand shared objects and control changes and copies.4 lessons
Unit overview · Unit challenge
- When Names Share the Same Object
- Changing Objects and Choosing Safe Keys
- Copying Nested Data Without Surprises
- Designing Functions That Control Mutation
07Solving Problems with AlgorithmsBreak problems into steps and check your algorithms.4 lessons
Unit overview · Unit challenge
- Turn a Vague Idea into Testable Examples
- Turn a Plan into Working Python
- Choose an Algorithm That Fits
- Know It Works and Understand the Cost
08Errors, Exceptions, and DebuggingRead errors, investigate bugs, and verify repairs.4 lessons
Unit overview · Unit challenge
- Understand Failures and Read Tracebacks
- Raise Useful Errors and Handle Expected Failures
- Debug One Hypothesis at a Time
- Pause, Inspect, and Shrink a Bug
09Files, Paths, and External DataRead, validate, and write files and external records.5 lessons
Unit overview · Unit challenge
- Find, Read, and Write Files Reliably
- Keep Text Intact Across Encodings and Newlines
- Move Records Between CSV, JSON, YAML, and Python
- Turn Messy Text into Trustworthy Records
- Cross the Text–Binary Boundary Safely
10Modules, Environments, and Python ProjectsOrganize reusable code and build reproducible Python projects.6 lessons
Unit overview · Unit challenge
- Find the Right Tool Without Memorizing Everything
- Turn One Script into Reusable Modules
- Design a Package People Can Rely On
- Build a Project You Can Navigate and Share
- Give Each Project a Clean Python Environment
- Build and Verify an Installable Python Project
11Object-Oriented Python and DataclassesModel data and behavior with classes and dataclasses.5 lessons
Unit overview · Unit challenge
- Build Your First Useful Class
- Keep Objects in Valid States
- Use Dataclasses for Value-Like Objects
- Choose Composition Before Inheritance
- Model a Complete Road-Crossing Game
12Command-Line ApplicationsBuild commands with clear inputs, output, and useful errors.5 lessons
Unit overview · Unit challenge
- Design a Friendly Command with argparse
- Put Output, Errors, and Exit Status in the Right Place
- Resolve Configuration Without Exposing Secrets
- Write Useful Logs Without Polluting Output
- Keep the Command Thin and the Core Reusable
13Testing Python ProgramsProtect behavior with focused, reliable tests.7 lessons
Unit overview · Unit challenge
- Write Tests That Protect Behavior
- Run Pytest and Read the Failure
- Turn Examples into Clear Parametrized Cases
- Build an Isolated Test World with Fixtures
- Control Dependencies Without Fragile Mocks
- Test at the Smallest Boundary That Can Fail
- Preserve Bugs and Explore General Rules
14Code Quality and MaintainabilityMake code easier to read and safer to change.7 lessons
Unit overview · Unit challenge
- Write Python People Can Follow
- Make Contracts Visible with Type Annotations
- Read MyPy Errors and Close Type Gaps
- Format and Lint a Project with Ruff
- Catch Small Problems Before Commit
- Repeat the Quality Gate in CI
- Refactor in Small, Verified Steps
15Documentation as Part of the ProductWrite, check, and publish documentation people can use.7 lessons
Unit overview · Unit challenge
- Design Documentation Around Reader Needs
- Write Instructions People Can Follow
- Document a Public Python API
- Keep Small Examples Honest with Doctest
- Review Documentation Like Code
- Build a Documentation Site with Quarto
- Publish Documentation and Keep It Trustworthy
Assessment and progress
Predict, run, explain, modify, quiz, and debug as you work through each lesson. Then apply what you learned in the unit challenge. Most challenges take 60–120 minutes and include progressive checks, hints, and a solution to review when you need it.
Progress is saved privately in this browser and is self-reported. It is not a grade or a verified credential. The final project and certificate are planned; participation details will be announced when they are available.
Study offline
Download the complete Foundations study book
The PDF contains the full course, printable checkpoints and answers, offline study guidance, and a personal study record. Use lesson links to return to Colab when you want to run code. PDF reading does not update your browser progress.
Back to top