exceptions this provides brief introduction to exceptions basics if you are writing program that someone else is going to useyou don' want it to crash if an error occurs say your program is doing bunch of calculationsand at some point you have the line = / if ever happens to be you will get division by zero error and the program will crash here is an examplea / print'hi there 'zerodivisionerrorint division or modulo by zero once the error occursnone of the code after = / will get executed in factif the user is not running the program in idle or some other editorthey won' even see the error the program will just stop running and probably close when an error occursan exception is generated you can catch this exception and allow your program to recover from the error without crashing here is an examplea tryc= / except zerodivisionerrorprint'calculation error 'print'hi there 'calculation error