What an error is (and that it's fine)
P39.first-steps.03 · Audience: guest, language-pro, it-ml · Prerequisites: Printing and seeing output
The first time a cell answers with a red message instead of a result, it feels like you broke something. You did not. Learning to read that red message calmly is genuinely half of programming — so we will make one happen on purpose.
ⓘ Concept: An error is Python helping, not scolding
A red message is called a traceback. Its last line names the problem, and it points at the line that caused it. Nothing is broken on your computer — Python is telling you, in its very literal way, which word confused it. Read the last line first: it is often a plain sentence like "name 'mesage' is not defined".
Why it matters — Beginners who fear errors stop experimenting. Beginners who read them calmly learn fastest, because the error usually says exactly what to do.
The manual comparison
When you proofread, a red pen mark does not mean the whole document is ruined — it points at one spot to fix. A traceback is Python's red pen: one spot, one line, one thing to correct. Fix it and run again.
Your turn
The rung below is broken on purpose. Run it once and read the red message — it will complain about a name it does not recognise, because a typo dropped a letter. Fix the typo so the cell runs, and type out the exact word the message named, to prove you read it.
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
🎓 Practice ladder
1 graded rung · ~5 minRunning the broken cell will show a red error — that is expected and is the whole point. Fix the one character, run again, and it turns green.
Explorer rung — fix the broken cell
Loading exercise…
Where next?
Go up a level