Due: October 6, 2021
Points: 20
In the given examples, what you type is in red and the program prints what is in black. Your program output should look exactly like the output in the examples, except that what you type won’t be in red.
Add exception handling to the answer for problem 1, so that if the input is not a number, the program prints an error message.
In the second example below, notice there are two decimal points (which is not allowed).
To turn in: Please turn in the program in the file weightcvt-ex.py.
Examples:
Enter temperature in degrees Fahrenheit: hello The input must be a real number
Enter temperature in degrees Fahrenheit: 100..5 The input must be a real number
|
ECS 235A, Computer and Information Security Version of September 23, 2022 at 2:23PM
|
You can also obtain a PDF version of this. |