Level 1
0 / 100 XP

Section 8 overview

Every programmer writes code that breaks. Beginners think errors mean they're doing something wrong. Experienced developers know errors are just part of the job — a normal step on the way to working code.

The difference isn't that experts avoid errors. It's that they know how to read them and fix them quickly, instead of panicking.

What you'll cover

  • Common errors and tracebacks — the handful of errors you'll hit most often (NameError, TypeError, SyntaxError), and how to read the traceback Python prints when something goes wrong
  • Debugging with print() — the simplest, most universal debugging tool, and how to use it to see exactly what your code is doing
  • Hands-on practice — you'll fix real broken programs, one bug at a time

The mindset that matters

When your program crashes, Python isn't yelling at you — it's helping you. The error message tells you what went wrong and where. Once you learn to read it, an error goes from scary to useful in a few seconds.

By the end of this section, a red error message won't stop you. You'll know how to find the line, understand the problem, and fix it.

Click Next and let's learn to read errors.