Errors Are Instructions
Meet your first error messages and learn the habit every developer has.
You WILL make mistakes โ every professional does, constantly. The difference between frustration and progress is treating errors as instructions, not insults.
A first syntax error
print("Hello)
Python refuses to run this and prints something like:
SyntaxError: unterminated string literal (detected at line 1)
Read it slowly. It tells you: what went wrong (an unterminated string โ a quote never closed) and where (line 1). Most error messages are exactly this: a diagnosis and a location.
A first runtime error
print(5 / 0)
Syntax is fine; the failure happens while running:
ZeroDivisionError: division by zero
The error's name (ZeroDivisionError) is a category you will learn to recognize.
The message is the specific reason.
The habit that changes everything
When code fails:
- Read the last line first โ error type and message.
- Look at the line number it points to (the real bug is often just above it).
- Fix one thing, run again. Small steps.
From this lesson on, when a practice challenge fails, the console shows you real error output. That output is not the platform being mean โ it is exactly what your own terminal will show you. Learn to like it.