Question: Build a Python Calculator with Input Validation and Loop
Write a Python program that functions as a simple calculator, which allows the user to perform
basic arithmetic operations. The program should prompt the user to input two numbers and then
choose an arithmetic operation to perform on these numbers. The available operations are:
1. Addition
2. Subtraction
3. Multiplication
4. Division
Your program should meet the following requirements:
1. Input Validation:
o Ensure the user provides valid numbers.
o Prevent division by zero by displaying an error message if the second number is
zero and the division operation is selected.
2. Loop for Multiple Calculations:
o After displaying the result of the chosen operation, ask the user if they want to
perform another calculation. If the user responds with "yes," repeat the process.
o If the user chooses "no," exit the program with a goodbye message.
3. User Choices:
o The user should be able to choose one of the four operations by entering a number
(1 for addition, 2 for subtraction, etc.).
o If the user provides an invalid option, display an error message and prompt for a
valid choice.
4. Exit Option:
o Provide an option for the user to exit the program anytime.
Example Output: