Learn
Learn to code
Pick a language, gear up your hero, and battle through short lessons you can run right on the page.
The friendliest first language — clean syntax, runs right here.
Boss
Pythus, the Coiled Serpent
“Indentation is my domain. You will slip.”
- 1
Your First Program
Write and run your very first lines of Python, right here on the page.
5 min · Python
- 2
Variables
Store values in named boxes called variables, then reuse them.
6 min · Python
- 3
Numbers & Math
Use Python as a calculator — and do math with your variables.
6 min · Python
- 4
Working with Text
Join text together, measure it, and change its case.
7 min · Python
- 5
Lists
Hold many values under one name, and reach for the one you want.
7 min · Python
- 6
Making Decisions
Run different code depending on whether something is true.
8 min · Python
- 7
Loops
Repeat work without writing it out a hundred times.
8 min · Python
- 8
Functions
Package code under a name so you can reuse it.
9 min · Python
- 9
Dictionaries
Store values under their own names instead of numbered positions.
8 min · Python
- 10
Power Tools: map, filter & Comprehensions
Python's shortcuts for transforming and filtering a list in one line.
9 min · Python
Classic problem-solving patterns, ordered from easiest to hardest. Examples adapt to your language — every language track has a full translation. Finish a language track first, then work through these at your own pace. Work top to bottom, each lesson gets a little harder. Skip until you're comfortable with variables, loops, and functions.
Boss
The Algorithm Archon
“Patterns are power. Prove you see them.”
- 1
Prefix Sums
Precompute running totals so any range sum becomes a quick subtraction.
6 min · Python examples
- 2
Frequency Counting
Use a dictionary to count how many times each value appears.
6 min · Python examples
- 3
Two Pointers
Walk two indices through a sorted array to find pairs or ranges in one pass.
7 min · Python examples
- 4
Sliding Window
Track a moving subarray window to answer range questions without restarting from scratch.
7 min · Python examples
- 5
Greedy Algorithms
Make the locally best choice at each step when that strategy is safe.
7 min · Python examples
- 6
Binary Search
Cut a sorted list in half each step to find a value in logarithmic time.
8 min · Python examples
- 7
Stacks
Last-in-first-out structure for matching brackets, undo logic, and monotonic scans.
7 min · Python examples
- 8
Linked Lists
Chain nodes with next pointers — traverse, count, and update without shifting a whole array.
8 min · Python examples
- 9
Breadth-First Search (BFS)
Explore a graph level by level — shortest steps in an unweighted grid or maze.
9 min · Python examples
- 10
Depth-First Search (DFS)
Dive deep along one path before backtracking — great for exploring all reachable nodes.
9 min · Python examples
- 11
Graphs
Represent nodes and edges with an adjacency list, then traverse to explore connections.
9 min · Python examples
- 12
Backtracking
Try choices, undo when they fail, and search all valid combinations.
10 min · Python examples
- 13
Dynamic Programming
Break a problem into overlapping subproblems, remember answers, and reuse them.
10 min · Python examples