Recover From Errors (Exercise)
Yet another way of controlling the flow of your Python program is error handling. So, you can use
except to catch and handle errors and influence the way that your program executes using these structures.
00:30 “Once the user enters an integer, the program should display the number back to the user and then end,” and the program should never crash. You’re supposed to catch a common error that could happen when the user inputs something that you want to convert to an integer, but it’s not convertible to an integer, then the program would otherwise crash.
Become a Member to join the conversation.