General Coding
Start programming with Python and everyday problems. Learn to work with values, functions, collections, and files, then bring the pieces together in a small application.
What helps
No previous coding experience is needed for Foundations. Bring a willingness to try small changes and read the results before moving on.
Python pathway
Programming Foundations / Practice rooms / Track curriculum and enrollment
Foundations
The absolute basics: store values in variables, do arithmetic, work with text, convert between types, and print results. By the end you build a small receipt calculator.
- First steps: 5 lessons
- Numbers: 5 lessons
- Strings: 5 lessons
- Type conversion: 5 lessons
- Build a receipt: 5 lessons
Control Flow
Teach your programs to decide and repeat. Booleans, if/elif/else, and/or/not, while and for loops, ending in a small board-game simulation.
- Yes or no: 5 lessons
- Making decisions: 5 lessons
- Combining conditions: 5 lessons
- Repeat until: 5 lessons
- For each: 5 lessons
Functions
Package code into named, reusable tools. Parameters, return values, scope, defaults and keyword arguments, building up to a small Mad Libs story generator.
- Define and call: 5 lessons
- Passing values in: 5 lessons
- What comes back: 5 lessons
- Flexible functions: 5 lessons
- A Mad Libs machine: 5 lessons
Collections
Store and organise many values at once. Lists, dictionaries, sets and tuples, building up to a word-frequency report over real text.
- Lists: 5 lessons
- Working with lists: 5 lessons
- Dictionaries: 5 lessons
- Sets and tuples: 5 lessons
- Word frequency: 5 lessons
Strings and Text
Take text apart and put it back together. Slicing, the string methods, formatting and parsing, building up to a working Caesar cipher that encrypts and decrypts.
- Slicing text: 5 lessons
- String methods: 5 lessons
- Formatting: 5 lessons
- Building strings: 5 lessons
- A secret cipher: 5 lessons
Algorithmic Thinking
How computers solve problems efficiently. Recursion, linear and binary search, sorting from scratch, ending in a binary-search guessing-game solver.
- Recursion: 5 lessons
- More recursion: 5 lessons
- Searching: 5 lessons
- Sorting: 5 lessons
- The guessing game: 5 lessons
Objects
Bundle data and behaviour together with classes. Attributes, methods, state, and inheritance, building up to a tiny RPG where two characters duel automatically.
- Your first class: 5 lessons
- Methods: 5 lessons
- State and behaviour: 5 lessons
- Inheritance: 5 lessons
- A tiny RPG: 5 lessons
Robust Programs
Write code that survives the real world. Catch and raise exceptions, read and write JSON, use the standard library, ending in an inventory loader that never crashes on bad data.
- When things go wrong: 5 lessons
- Raising and cleanup: 5 lessons
- JSON: 5 lessons
- Batteries included: 5 lessons
- A robust loader: 5 lessons
Working with Data
Process collections with style. Comprehensions, filtering and mapping, lambdas and sorting keys, generators, building up to a sales-data report.
- Comprehensions: 5 lessons
- Filter and transform: 5 lessons
- Functions as values: 5 lessons
- Generators: 5 lessons
- A data pipeline: 5 lessons
Capstone: Build an App
Everything you have learned, in one project. Model tasks with dicts and lists, operate on them with functions and a class, parse text commands, and run them into a working command-line to-do app.
- The data model: 5 lessons
- Operations: 5 lessons
- A TaskList class: 5 lessons
- Showing it: 5 lessons
- The app: 5 lessons