Chapter 10 (error checking) Flashcards
What is a syntax error?
Violating a programing languages rules on combinations of symbols and functions to create a program
Is a syntax error found as the code is run sequentially or before the program is run?
Before the program is run
How do you avoid errors in your code?
Frequently run it to make sure each new section of code works
What is a runtime error?
When syntax is correct but an impossible operation is attempted, like dividing by 0 or change a string to an int()
Are run time errors found during the sequential running of code or before the program is run?
Running the program, it results in a crash
What is a crash?
An unintentional termination of code
What is an indentation error?
When the code is not properly indented
What is a value error?
When an invalid value is given, like a string giving to an integer variable
What is a name error?
When the program tries to use a variable that does not exist
What is a type error?
When an operation does not work because of the data type,
- string / string
What is a logic error?
When the code isn’t incorrect but it runs incorrectly
what is an EOFError?
Input( ) hits an end-of-file (EOF) condition without reading anything. The input function has no input to read
What is a KeyError?
When a key isn’t found when reading a dictionary
What is a ZeroDivisionError?
divide by zero error
What is an Index Error?
Index out of range