Skip to Content
Learn
Errors in Python
Review

Finding bugs is a huge part of a programmer’s life. Don’t be intimidated by them! In fact, errors in your code mean you’re trying to do something cool.

In this lesson, we have learned about the three types of Python errors:

  • SyntaxError: Error caused by not following the proper structure (syntax) of the language.
  • NameError: Errors reported when the interpreter detects an object that is unknown.
  • TypeError: Errors thrown when an operation is applied to an object of an inappropriate type.

There is also another type of error that doesn’t have error messages that we will cover down the line:

  • Logic errors: Errors found by the programmer when the program isn’t doing what it is intending to do.

Remember, Google and Stack Overflow are a programmer’s BFFs (best friends forever) in situations where an error is giving you a lot of trouble. For some more motivation, check out this blog post.

We wish you the best of luck in your bug-squashing journey! 🔎

Instructions

Make sure to bookmark Codepedia: Errors in Python for a full list of Python error types.

Inside review.py, see if you can intentionally spin up some new errors!

Folder Icon

Sign up to start coding

Already have an account?