Exception Handling Flashcards

1
Q

SyntaxError

A

Raised when there’s an error in syntax of the python code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ValueError

A

Raised when a built in method or operation receives an argument that has the right data type but mismatched or inappropriate values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

IOError

A

Raised when the file specified in the program cannot be opened

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

KeyboardInterrupt

A

Raised when the user accidentally hits the delete or esc key while executing the program due to which normal flow of the program is interrupted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

ImportError

A

Raised when the requested module definition is not found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

EOFError

A

Raised when the end of file condition is reached without reading any data by input()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ZeroDivsionError

A

Raised when denominator in a division operation is zero

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IndexError

A

Raised when the index in a sequence is out of range

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

NameError

A

Raised when a local or global variable name is not defined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

IndentationError

A

Raised due to incorrect indentation in the program code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

TypeError

A

Raised when an operator is supplied with a value of incorrect data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

OverFlowError

A

Raised when the result of a calculation exceeds the maximum limit for numeric data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly