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.
Like Duolingo, but for Writing Code with Python. Tomo turns the whole topic into a game you play five minutes a day, until it actually sticks.
24 levels across 4 sections, about 48 minutes end to end, roughly 10 days at five minutes a day. It moves through First Words and Calculations, Controlling Program Flow, Working with Collections, and Packaging and Protecting Code. It starts from scratch.
Free forever · No credit card · iPhone & Android

Key ideas in Writing Code with Python
- Python processes code sequentially starting from line 1 downward
- A print statement only reflects the value of a variable at the exact moment that line runs
- Numbers and math operators without quotes compute before printing
- print() displays the evaluated result of calculations passed inside its parentheses
- Enclosing characters in quotes tells Python to treat them as plain literal text (strings)
- Writing numbers and math without quotes tells Python to compute them as values
- The single equals sign assigns a value to a named variable
- Writing a variable name later pulls up whatever value was stored inside it
- Traceback messages read from bottom up or line by line to pinpoint the failing line number
- Python halts execution the moment it encounters an invalid instruction rather than continuing
- The input() function pauses script execution until the user presses Enter
- Whatever the user types is captured and returned as a string (text)
- input() always returns text, even if the user only types digits
- Python treats user input digits like characters in quotes rather than actual numbers ready for math
- int() turns text strings containing whole numbers into integers
- float() turns text strings containing decimals into floating-point numbers
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 Writing Code with Python 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.
You set your toy box to hold 3 cars, print it, and then add 5 more cars on the next line. What does print show?
Get it right to open this lesson and 23 more in the app.
Where Writing Code with Python takes you
- 1
First Words and Calculations
- Your First Working Script
- Gathering Input and Transforming Values
- 2
Controlling Program Flow
- Branching Logic with Conditions
- Automating Repetition with Loops
- 3
Working with Collections
- Ordered Sequences with Lists
- Keyed Data with Dictionaries
- 4
Packaging and Protecting Code
- Reusable Logic with Functions
- Defensive Scripts and External Modules
4 sections · 8 units · 24 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
Writing Code with Python is taught in the Explain Like I'm 5 style: no big words. promise.. 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.
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.
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.
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.
Writing Useful Python Scripts
Learn to write real Python code to automate everyday tasks and crunch data. Start by manipulating text and numbers, branch into smart decision-making, and finish by building reusable scripts.
Start Writing Code with Python today.
Download Tomo, search Writing Code with Python, and play your first lesson in under a minute.