CPython 3.14 in the page, nothing to install
Python courses that run in your browser
18 modules and 60 lessons take you from your first print() to classes, generators and small projects. Every lesson ends in a Lab you solve yourself and a quiz the server marks.
Lessons and the playground open without an account.
# add up the even numbers
numbers = (3, 8, 5, 12, 7, 10)
total = 0
for n in numbers:
if n % 2 == 0:
total += n
print(total)
- Prints 30, passed
- Skips the odd numbers, passed
- Keeps the for loop, passed
In numbers
The Python course in numbers
60
lessons, each with a Lab and a quiz
420
Lab tasks in 7 kinds, easy to hard
720
quiz questions in 9 kinds, marked on the server
80%
on a course final earns the certificate
- Introduction to Python
- Your First Python Program
- Variables & Dynamic Typing
- Core Data Types & Type Conversion
- Operators & Expressions
- Interactive Input & Output
- Conditional Branching (if / elif / else)
- Definite Iteration & for Loops
- Indefinite Loops & Loop Control
- Lists & Indexing Operations
- Tuples & Sequence Unpacking
- Strings & Text Representation
- String Methods & Text Sanitization
- Dictionaries & Hash Maps
- Set Creation & Deduplication
- Nested Data Structures
- Collections Module Tools
- Functions & Modular Code
- Positional & Keyword Arguments
- Recursion & the Call Stack
- Project: Number Guessing Game
- Project: Tip & Bill Splitter
- Project: To-Do Task Manager
- Lambda Functions and Higher-Order Builtins
- List Comprehensions
- Modules and Packages
- Reading and Writing Text Files
- Paths and Folders with pathlib
- JSON Files and Data
- CSV Files: Reading and Writing Tables
- Errors and Exceptions
- Handling Exceptions with try and except
- Raising and Defining Your Own Exceptions
- Classes and Objects
- Constructors, self and Attributes
- Inheritance and Method Overriding
- Regular Expressions
- Dates and Times
- Random Numbers and Secrets
- Project: Text Word Statistics
- Project: Personal Expense Tracker
- Project: OOP Bank Account System
- Iterators and the Iteration Protocol
- Generator Expressions and Lazy Evaluation
- Generator Functions and yield
- itertools: Building Blocks for Iterators
- Decorators
- Context Managers and the with Statement
- Special (Dunder) Methods
- Class Methods and Static Methods
- Encapsulation and Properties
- Type Annotations
- Structural Pattern Matching
- Assertions and Defensive Programming
- Advanced Regular Expressions
- Text Encodings and Binary Data
- Building a Data Pipeline
- Project: Server Log Analyzer
- Project: Caesar Cipher
- Project: Secure Password Generator
Each tile is one lesson.
Courses
One path, one course at a time
Start with the open course. The new courses open in order, each after the one before it.
- Beginner
Python Foundations
No prerequisite.
- 6 modules
- 23 lessons
- 3 h 5 min
- Getting Started
- Operators and Control Flow
- Lists, Tuples and Strings
- Dictionaries and Sets
- and 2 more
- Intermediate
Practical Python
Builds on Python Foundations.
- 6 modules
- 19 lessons
- 2 h 34 min
- Functional Tools and Modules
- Files and Data Formats
- Errors and Exceptions
- Classes and Objects
- and 2 more
- Advanced
Python in Depth
Builds on Practical Python.
- 6 modules
- 18 lessons
- 2 h 46 min
- Iterators and Generators
- Decorators and Context Managers
- Classes in Depth
- Robust Code
- and 2 more
Read it. Run it. Change it. Every lesson works the same way, so you always know what comes next.
1 idea
One concept a lesson, in plain words, before any code.
2 examples
Worked examples you run and change in the page.
3 mistakes
The errors people make most, and how to read them.
The Lab
A Lab for every lesson
420 tasks across 60 lessons, easy to hard, in 7 kinds. This is one Fix it task.
Step 1
Read the task
It should add up the even numbers and print 30. It prints 15.
Step 2
Find the line
Odd numbers pass the test on line 5, so they are added instead.
Step 3
Change one character
n % 2 == 1becomesn % 2 == 0.Step 4
Run it, pass the tests
Real CPython runs it in the page. Practice is saved; it earns no XP, quizzes do.
# add up the even numbers
numbers = (3, 8, 5, 12, 7, 10)
total = 0
for n in numbers:
if n % 2 == 0:
total += n
print(total)
- Prints 30, passed
- Skips the odd numbers, passed
- Keeps the for loop, passed
Quizzes
Quizzes marked on the server
9 kinds of question. Answer keys stay on the server until you finish, and every code answer was run in real Python first.
- Concept
- Predict the output
- Syntax
- Spot the bug
- True or false
- Choose all
- Fill the blank
- Order the lines
- Match the output
Sample question, order the lines
Put the lines in order so the program prints 6.
total += nprint(total)total = 0for n in range(1, 4):
Use the arrows to move a line.
Seasons
XP, seasons and certificates
A season lasts 4 months and each course keeps its own leaderboard. XP comes from verified learning, once each; Lab practice never earns it.
How XP is earned
| Complete a lesson | 5 XP |
|---|---|
| Each correct answer in a lesson quiz | 2 XP |
| A perfect lesson quiz | +6 XP |
| Pass a module exam at 80% | 40 XP |
| Pass a course final at 80% | 150 XP |
| Lab practice | 0 XP |
A certificate for each course
Score 80% or more on a course final and the certificate is issued with a check code anyone can look up.
Free learner ID
What an ID Gets You
Your progress, quiz marks and files stay with you on any device. The course itself is open without an account.
It remembers where you stopped
Finished lessons are ticked off, and Home points at the next one.
Your marks are kept
Quiz attempts and practice results stay, with the answers you gave.
A drive for your own files
Keep your own .py scripts and notes, up to 10 MB per file.
Wrong answers come back
Questions you miss return in a review queue, spaced out over days.
Streak, XP and a leaderboard place
Verified learning earns XP and a season board place; Lab practice earns none.
Notes that stay put
Write notes on any lesson and find them all on your Notes page.
20 badges and a certificate
Badges as you go, and a certificate for each course final you pass at 80%.
The same place on every device
Progress is stored against your ID, so your phone and laptop agree.
- No email address
- Three things to type
- Under a minute
- Free, with no card
Lesson one