except Flashcards
1
Q
exception
A
events detected during execution that disrupts the normal flow of a program
2
Q
initiating exception
A
start your block of code with the “try:” statement
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
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
5
Q
A