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 1, Topic 5
In Progress

Python: Errors

Yasin Cakal 3 Oct 2021
Lesson Progress
0% Complete

Humans are prone to error. Additionally, humans are typically in charge of developing computer programs. To compensate, programming languages attempt to comprehend and explain program errors.

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

SyntaxError and NameError are two frequently occurring errors when writing Python.

  • A SyntaxError indicates that something is wrong with the way your program is written, such as misplaced punctuation, an unexpected command, or a missing parenthesis.
  • When the Python interpreter encounters a word that it does not recognize, a NameError occurs. A NameError will be thrown if the code contains something that appears to be a variable but was never defined.

%d bloggers like this: