Terminating a python program from within a try block I have a python program that takes integer only inputs like this: