Getting Started
Write and run your first programs, and store values in named variables of the right type.
Lab
Every lesson has its own Lab, from writing code to tracing it by hand, and every module ends in drills and a capstone. Hints come one at a time and you can see each answer. Lab work is saved as practice and earns no XP.
Lab tasks need a free ID, which keeps your progress on every device. Lessons, worked examples and the playground stay open without one.
Fill the marked gaps in the starter code.
Write and run your first programs, and store values in named variables of the right type.
Calculate with operators, talk to the user, and steer a program with decisions and loops.
Keep ordered values in lists and tuples, and slice, search and reshape text.
Look values up by key, keep unique items, and nest collections to model real data.
Name a piece of work, pass it arguments, and let a function call itself.
Build three small programs end to end with everything from this course.
Write small functions inline, build collections in one expression, and split code into modules.
Read and write files, work with paths, and load and save JSON and CSV data.
Read error messages, recover from failures, and raise errors of your own.
Model things as classes with their own data and behaviour, and build on them with inheritance.
Match text patterns, work with dates and times, and make random choices.
Build three programs that read data, handle bad input and keep state in classes.
See how a for loop really works, and produce values lazily with generators and itertools.
Wrap functions with decorators and guarantee clean-up with context managers.
Plug classes into Python's protocols, choose the right kind of method, and guard attributes.
Describe types, match the shape of data, and fail early and clearly.
Parse text with advanced patterns, handle bytes and encodings, and build a data pipeline.
Build three programs that analyse logs, encrypt text and generate secure passwords.