except Flashcards

1
Q

exception

A

events detected during execution that disrupts the normal flow of a program

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

initiating exception

A

start your block of code with the “try:” statement

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

printing any exception

A

except exception as x:
print(x)

this will define the exception as x and as such print it to let the user know what went wrong

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

finally:

A

This statement usually goes at the end of a try/exception block and is the last piece of code that is executed

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