Errors
Updated Oct 31, 2019 ·
Overview
An error occurs when code violates a rule, causing the program to stop. Errors are also called exceptions, and they prevent code from running. To avoid errors, it's important to write clean and valid code.
Common Errors
TypeError
Occurs when incompatible data types are used together.
Example: Adding a string to an integer.
print("Hello" + 10)
Output:
`TypeError: can only concatenate str (not "int") to str`