0% found this document useful (0 votes)
49 views4 pages

Python Errors

The document outlines common types of errors encountered in Python programming, including SyntaxError, IndentationError, EOFError, and others. It provides a brief description of each error type, such as ValueError for inappropriate argument values and ZeroDivisionError for division by zero. References to official Python documentation are also included for further reading.

Uploaded by

Ali Al Khamis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views4 pages

Python Errors

The document outlines common types of errors encountered in Python programming, including SyntaxError, IndentationError, EOFError, and others. It provides a brief description of each error type, such as ValueError for inappropriate argument values and ZeroDivisionError for division by zero. References to official Python documentation are also included for further reading.

Uploaded by

Ali Al Khamis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Errors

Brandon Krakowsky
Python Errors

Property of Penn Engineering |


Common Error Types
Here are some common types of errors in Python
• SyntaxError: the syntax (or structure) of the code is incorrect
• IndentationError: the indentation (or spacing) of the code is incorrect
• EOFError: end of file error, caused by reaching the end of an input when trying to read data
• AssertionError: assert statement fails, e.g., when asserting that one value is equal to (or not
equal to) another value in a unit testing method
• ValueError: a function receives an argument with an inappropriate value
• NameError: use of a variable or function name that is not valid (or doesn’t exist)

Ref:
• [Link]
• [Link]

Property of Penn Engineering |


Common Error Types
Here are some common types of errors in Python
• TypeError: an operation or function is applied to a value with an inappropriate data type
• IndexError: an index is out of range in a sequence, e.g., a list
• KeyError: a key is not found in a dictionary
• KeyboardInterrupt: execution of code is interrupted by the user
• MemoryError: an operation runs out of memory.
• ZeroDivisionError: division (or modulo operation) by zero

Ref:
• [Link]
• [Link]

Property of Penn Engineering |

You might also like