What is a syntax error?
an error caused by code that is not legal in Python
What is a logic error?
an error that causes the code to give incorrect results
What is a runtime error?
an error that causes the Python interpreter to stop running
What does the Python interpreter do when it comes upon a runtime error?
creates an exception object
What is an exception?
an unusual event that the Python interpreter cannot handle
What type of statement can be used to deal with an exception?
a try/except statement
What should you put in the first block of the above statement?
any code that might cause a runtime error
What code should you put in the second block of this statement?
code that deals with the exception
What happens when an exception is encountered in the
of such a statement?
the interpreter stops running the code in the 1st block and jumps to the code in the 2nd block