Debugging is the process of finding and correcting existing and potential errors (also called bugs) in software code. Bugs can cause software code to behave unexpectedly or crash.
Common causes of logic errors
Not correctly understanding what the program needed to do
Using the incorrect logical operator in a selection statement
Missing or incorrect positioning of brackets in mathematical calculations, which means that the incorrect result is returned
Loops that execute more or fewer times than intended
Common causes of syntax errors
Spelling or typing errors
Missing parentheses, ( ) or { }
Missing colons (:), or semicolons, (;), in statements in which they are required by the language
Missing or unexpected indentation in Python
Printing a value without declaring it
Common causes of runtime errors
Trying to access a list item that does not exist
A mathematical calculation that results in the program trying to divide by 0
Trying to perform numerical operations on strings
Linking to a file or resource that has been moved or no longer exists
Logical operators
Symbols used to represent circuits of transistors within a computer