Numbers and Variables
Display a message, name values, and divide a quantity into whole groups.
Write and run Python in your browser, from your first expression to a small program.
0 of 120 exercises completed
0%Part 1
Calculate with numbers, format text with f-strings, and convert values between types.
Beginner · 3 modules
Display a message, name values, and divide a quantity into whole groups.
Clean text, take slices, and insert values into readable labels.
Convert text explicitly and distinguish numbers, strings, and booleans.
Part 2
Choose a branch with if and elif, return a result, and combine small functions.
Beginner · 3 modules
Use comparisons and select a single branch with if, elif, and else.
Define a function, call it with arguments, and provide sensible defaults.
Split a calculation into helpers and pass the result of one call to the next.
Part 3
Unpack tuples, slice lists, visit their items with for, and repeat steps with while.
Beginner · 3 modules
Return related values together and unpack a tuple into named variables.
Select items from ordered sequences, take slices, and construct new lists.
Repeat a fixed number of steps or keep going until a condition changes.
Part 4
Look up and update values by key, then use sets to count or compare unique items.
Beginner to intermediate · 2 modules
Look up values by key and update quantities in a dictionary.
Track distinct values, detect first occurrences, and compare membership.
Part 5
Write comprehensions to transform values and group records to summarize a dataset.
Intermediate · 2 modules
Express transformations and filters with Python comprehensions.
Read lists of records and group their values into useful summaries.
Part 6
Handle exceptions, calculate statistics, and work with dates using the standard library.
Intermediate · 2 modules
Handle failed conversions and reject invalid values with meaningful exceptions.
Import tested tools for rounding, statistics, and calendar arithmetic.
Part 7
Read and write text files, load JSON documents, and process rows from CSV files.
Intermediate · 3 modules
Read, write, and process UTF-8 files in the browser's temporary filesystem.
Decode, encode, and edit structured settings with Python's json module.
Read and write tabular data with headers, quoting, and numeric conversions.
Part 8
Build a stock report and summarize weather records using the skills from earlier parts.
Intermediate · 2 modules
Turn a shop's inventory counts and deliveries into a restocking report.
Clean temperature measurements and export a daily weather summary.