Get the app

Python

Read, trace, predict and debug real Python on your phone — from your first script to reading a 50-line file cold. No installs, no typing.

18 lessons

Download on the App Store
Explore with AI:ChatGPTClaudePerplexity

What you'll learn

  1. Unit 1

    What a Python Script Does

    6 lessons
    1. A real eight-line script a colleague sent — it totals three expense lines and prints one sentence. The learner reads it BEFORE anyone explains it and predicts the sentence; the reveal is that they were right, because the machine does exactly what the lines say, in order.
    2. The same expenses script, one line changed: `total = total + tip`. The learner watches ONE name change hands as the pointer moves, then meets the interpreter tripping on `totl` — the literal machine, shown before it is named.
    3. The learner acts by tapping the value each name holds at the line the pointer is on, and the material responds by filling that trace row and revealing the next line's row. One durable trace table beside a six-line roster script; every beat is a hidden cell the learner fills as the pointer descends. The capstone hides the printed line itself.Exercise
    4. Cold. Five fresh 4–6 line scripts (never the lessons' scenarios): predict the output, spot the line that stops the run, and say which of two nearly identical scripts prints the shown text.Challenge
    5. The learner acts by tapping, in a table of what exists on the machine, the rows that change when a script is edited, run, or run again, and the material responds by lighting the rows that actually changed. The same script run twice with an edit between: which rows are the file, which are the run. Deepens the interpreter atom to R2 on a durable table.Exercise
    6. Terminal gate. Samples all four bequeaths cold from the pool, weighted toward prediction items.Unit review
  2. Unit 2

    Make the Script Decide

    6 lessons
    1. A shipping script: `if total > 50:` free shipping, else a fee. Two orders, two outputs, one script — the learner works out which line ran for each BEFORE the word 'condition' appears.
    2. A login script that combines two checks with `and`; the learner predicts what `and` does when the first half is already False, then meets `or` and `not` on the same lines.
    3. The learner acts by tapping, for each run of the script, the value the comparison takes and the line that runs next, and the material responds by filling the trace row and greying the skipped branch in the listing. One grade-band script (`if score >= 90: … elif score >= 70: … else: …`) traced for three scores; the elif that never runs for 95 is the aha.Exercise
    4. Cold: fresh if / elif / else scripts and comparison tables; which line runs, which comparison is True, which indentation makes the else belong to the inner if.Challenge
    5. The learner acts by choosing, line by line, the comparison and branch that reproduce a table of required outputs, and the material responds by tracing the candidate rule over every input row and marking which rows it now gets right. A pricing rule stated in prose by a manager; the learner assembles the if / elif chain that satisfies four example orders, and the trace shows which orders each draft handles.Exercise
    6. Terminal gate: cond and bools at their target rungs plus a deliberate sample of seq_read (unit 1 seam).Unit review
  3. Unit 3

    Numbers, Text and What Python Won't Mix

    6 lessons
    1. A form field arrives as `"3"`; `"3" + 3` stops the run. The learner predicts the crash, then the fix, and only then hears the word type.
    2. The learner acts by tapping the value and type each expression produces as the pointer moves, and the material responds by filling the trace row and flagging the line where the types stop fitting. A six-line receipt script mixing text and numbers; trace value and type per line; the finale predicts the line that raises.Exercise
    3. Cold: fresh expressions and literals; what type, what value, which line raises, which conversion fixes it.Challenge
    4. A pasted name list with stray spaces and mixed case; the learner predicts what `.strip()`, `.split(',')`, `.upper()` and `in` produce, one method per beat.
    5. The learner acts by tapping, in a table of names and values, the cells an f-string will pull in and the text it will print, and the material responds by rendering the printed sentence beside the template. One value table, four f-strings of rising complexity (`{total:.2f}`, `{name.upper()}`); the learner produces the printed sentence.Exercise
    6. Terminal gate over four atoms plus a vars sample.Unit review

Explore more roadmaps

Algebra & Precalculus
The foundation curriculum that prepares you for any university-level math course — calculus, linear algebra, discrete math, statistics. Builds symbolic fluency from variables and equations through functions, polynomials, exponentials, trigonometry, and the proof and set-theory groundwork that modern mathematics rests on.
Leveraging AI
A beginner-friendly curriculum that builds deep intuition for how AI actually works — not through math or code, but through mental models that make effective use a natural consequence of understanding. Covers how language models think, why they hallucinate, the art of prompting, practical AI workflows for writing, images, and code, and the societal shifts AI is driving. Designed for anyone curious enough to want more than tips and tricks.
About 30 hours
Philosophy
A guided tour through philosophical thinking — how to reason carefully, evaluate arguments, navigate ethics, and engage with the great questions about knowledge, reality, mind, and society. The trunk gives you orientation across the whole field; clusters dive deep on logic, ethics, epistemology, metaphysics, mind, politics, and the history of ideas.
Investing & Trading
How markets, brokers, and order books actually work — and what the evidence says about trying to beat them. The trunk covers market mechanics, asset classes, leverage, and the risk math every participant needs; clusters dive into microstructure, execution, the retail arenas, sizing math, psychology, manias, and strategy evidence.
Game Theory
A working understanding of game theory — the study of how rational agents make decisions when outcomes depend on each other's choices. The trunk gives you the core solution concepts and vocabulary; clusters dive into auctions, bargaining, evolutionary games, mechanism design, and where the rational-actor model fails.
Economics
A working understanding of how economies actually behave — how scarcity drives choice, how markets allocate resources (and fail to), how money and policy steer the macroeconomy, and how trade, behavior, and institutions shape long-run prosperity. The trunk gives you the throughline a literate citizen needs; clusters dive into elasticity, market failures, consumer/producer theory, monetary and fiscal policy, trade policy, behavioral finance, and economic history.

Frequently asked questions

What does the Python roadmap cover?

3 units: What a Python Script Does, Make the Script Decide and Numbers, Text and What Python Won't Mix.

Who is the Python roadmap for?

Anyone handed a Python script — an analyst, a grad student, a career changer, a curious teenager — who wants to read it and know what it does before it runs.

How do I start the Python roadmap?

Get the Mochivia app on the App Store and open this roadmap there.

Start Python

Download on the App Store