How Code Works
Discover how programmers turn everyday human ideas into instructions computers can execute. Master variables, decision branching, and automated loops to build your first functioning logic blocks with confidence.
Like Duolingo, but for How Code Works. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.
A short one: 12 levels across 2 sections, about 24 minutes end to end, roughly 5 days at five minutes a day. It moves through Giving Clear Instructions and Scaling Logic and Reusing Work. It starts from scratch.
Free forever · No credit card · iPhone & Android

Key ideas in How Code Works
- A computer reads and runs code line by line from top to bottom
- A line cannot use or print a value that hasn't been created on a previous line
- Printing must come after assembling the final text to display the full result
- A variable is a labeled container that holds only one value at a time
- Storing a new value in a variable completely replaces whatever was in it before
- Numbers surrounded by quotes are treated as text (strings), so the + operator glues them end-to-end
- Plain numbers are treated as numerical values, so the + operator performs addition
- Comparisons evaluate to a true-or-false flag (boolean)
- A calculation happens at the specific moment that line executes
- A variable stores the calculated result, not an active link or live formula to the other variables
- Changing price later does not go back and recalculate total
- Operators like * perform arithmetic using the current values held in variables
- The computer looks up the value inside each variable before applying the operator and saving the new result
- An if statement checks whether a condition evaluates to true or false
- Code indented inside an if block only executes when its condition evaluates to true
- When the condition is false, the program skips the indented code entirely
You've tried the other tabs
Thirty open tabs. Four facts you actually kept.
You watched. You nodded. By Sunday it was gone.
One answer, then back to scrolling.
Eight weeks. You meant to finish. You didn't.
Tomo gives How Code Works the Duolingo treatment: levels, streaks, and quick quizzes that test what you just learned. That game loop is what the tabs above never had, so it's the one you actually finish.
Here's what playing it feels like
A real question from this course. Take your best guess.
What happens if a line of code tries to use or print a value that has not been created yet?
Get it right to open this lesson and 11 more in the app.
Where How Code Works takes you
- 1
Giving Clear Instructions
- Storing and Manipulating Data
- Branching Paths with Conditions
- 2
Scaling Logic and Reusing Work
- Automating Repetition with Loops
- Packaging Logic into Functions
2 sections · 4 units · 12 levels. Built to play, not to enroll.
Tomo is in ChatGPT
Tomo is also a ChatGPT plugin: the same playable courses, built and played inside your chat.
Add Tomo to ChatGPT- What to ask
- “Make me a Tomo course on black holes.” “Turn this chat into a Tomo course.”
- What you get
- Quick questions with instant feedback, hearts and stars, ready to play in about a minute.
- Where it goes
- No sign-up to start. Connect your Tomo account and your streak carries on in the app.
You pick the voice
How Code Works is taught in the Professor style: clear, structured, thorough. Want a different feel? In the app you can spin up the same topic in any of Tomo's teaching styles. Same facts, totally different vibe.
More Technology on Tomo
Python: Writing Useful Scripts
Learn how to write real, functioning Python code to automate tedious tasks and crunch everyday numbers. Build confidence step-by-step from your first variable to clean, reusable custom functions.
Thinking in Code
Learn how to command computers and build working software from scratch. Discover the core mechanics of programming, from simple step-by-step instructions to data structures and debugging.
Writing Code with Python
Turn plain text into working programs that calculate, automate, and solve real problems. Learn how to direct computer logic, work with collections of data, and build reusable scripts.
Writing Bash Scripts
Stop repeating manual terminal commands and let your computer do the heavy lifting. Learn to write clean, reliable Bash scripts that automate daily tasks, process text, and handle errors safely.
Writing Your First Python Scripts
Build a working intuition for the world's most popular programming language. Learn how Python stores information, makes decisions, and automates repetitive tasks with clean, readable code.
Python from Scratch
Learn to write real, working Python code to automate repetitive tasks, analyze information, and build your own applications. Master core syntax, data structures, and practical libraries through hands-on logic.
Start How Code Works today.
Download Tomo, search How Code Works, and play your first lesson in under a minute.