Question: One common problem when prompting for numerical input occurs when people provide text instead of numbers. When you try to convert the input to an

One common problem when prompting for numerical input occurs when people provide text instead of numbers. When you try to convert the input to an int, you'l1 get a ValueError. Write a python program that prompts for two numbers. Add them together and print the result. Catch the ValueError if either input value is not a number, and print a friendly error message. Test your program by entering two numbers and then by entering some text instead of a number. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
