Python User Input and Exceptions

User Input

In python, we can ask the user to enter some input for your program using the input() method. You first make a variable and set its value equal to input('question you want to ask'). Whatever the user enters will then be set as the variable's value. One important thing to remember is that the user input will always have a datatype of string even if the user enters a number so its your responsibility to make the conversion.

Exceptions

The try block lets you test a block of code for errors. The except block lets you handle and respond to the error without letting it stop your program from running its course. The finally block lets you execute code regardless of the result of the try and except blocks