Back to Course

Introduction to Python

0% Complete
0/0 Steps
  1. Python: Basics
    14Topics
    |
    15 Quizzes
  2. Python: Control Flow
    12Topics
    |
    12 Quizzes
  3. Python: Errors
    5Topics
    |
    5 Quizzes
Lesson 3, Topic 1
In Progress

Python: Debugging

Yasin Cakal 21 Oct 2021
Lesson Progress
0% Complete

Python refers to program mistakes as errors and will use a ^ character to indicate the location of an error. When programs produce unexpected errors, we refer to them as bugs. Debugging is the term used by programmers to refer to the process of updating a program so that it no longer produces errors.

Throughout your programming career, you are certain to run into an infinite number of errors. According to some, debugging consumes majority of development time. However, what distinguishes a successful programmer is not the ability to avoid errors, but the ability to resolve them. And a good place to start is by defining them.

There are numerous ways to classify errors in Python, but the following are some of the more common ones:

  • SyntaxError: An error that occurs when the language’s structure or syntax is incorrect.
  • NameError: Errors generated when the interpreter encounters an unknown variable.
  • TypeError: Exceptions that are thrown when an operation is performed on an object of an invalid type.

In this lesson, we’ll examine these various error messages and practice debugging them one at a time!

%d bloggers like this: