1. Pyroom
  2. Tutorials
  3. Getting started with Pyroom
  4. Read a Python error and fix it

Read a Python error and fix it

Errors are normal. This tutorial runs a program with a typo and uses the error message to find and fix it.

Intermediate Video coming soon. The steps below show everything the video will cover.

Steps

  1. This program adds up a list, but one name is misspelled.
  2. Run it. The console shows a NameError and the line where it happened.
  3. The message names the unknown variable. Fix the spelling to numbers.
  4. Run it again. The program now prints the total.
Read the transcript

This program adds up a list, but one name is misspelled.

Run it. The console shows a NameError and the line where it happened.

The message names the unknown variable. Fix the spelling to numbers.

Run it again. The program now prints the total.

Try it in the Playground

Nothing to install and no account needed.

Open Playground →