Reading Code

A track of P39 · Running Python & Notebooks.

What a rung is versus a notebook, and what an import line means — reading code before writing much of it.

You have now run cells, read output, and met your first errors — but a few things on the screen still have no names. This short track names them. It is reading practice, not writing practice: the goal is that when you look at any beginner-level page on this platform, or any example someone sends you, you recognise every part of what you are seeing.

Try this test on yourself. A colleague forwards you a snippet that begins import math, and asks if it looks right. Right now that first line probably reads like a password you were never given — official, slightly threatening, meaning unknown. But it is doing one homely job, the same job every time, and it is closer to "fetch the good dictionary from the shelf" than to anything technical. Which shelf? Fetched by whom? That is the second module, and after it the opening line of nearly every Python file ever written stops being a mystery to you — permanently.

Before that, the first module sorts out the surfaces you have been clicking between without a map. This platform shows you two kinds of box: the free-form notebook, where you experiment and nothing is graded, and the rung — the small exercise box that checks your answer against real tests and tells you honestly how it went. Knowing which one you are in changes how you behave in it: a notebook is scratch paper, a rung is a short quiz with the answer key unlocked after you pass. Two minutes of naming saves weeks of low-level confusion.

Two modules, then, and both are short — this is deliberately the smallest track in the discipline. But it earns its place: reading comes before writing here just as it did when you learned your other languages, and once notebook, rung, and import are ordinary words to you, the next pillar can spend all its time on the material itself.

The notebookwhere you experiment freelyThe runga small graded exerciseThe import lineborrowing ready-made tools
Three things named, and no beginner screen is a mystery again.