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.
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.
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.
Python Programming for Beginners
Stop reading about code and start writing it. Build your first programs immediately and learn how to think like a developer to solve real-world problems.
JavaScript for the Web
Learn the programming language that powers interactivity on the web. Go from typing your first commands to building reactive interfaces and fetching live internet data.
Everyday Excel
Build real confidence in spreadsheets by turning raw numbers into clean calculations, automated tables, and clear visual summaries.
Writing Idiomatic Python
Bridge the gap between working code and clean, Pythonic engineering. Learn to write expressive data transforms, robust object models, memory-efficient streams, and reusable decorators.
Start Writing Code with Python today.
Download Tomo, search Writing Code with Python, and play your first lesson in under a minute.