Due: October 12, 2023
Points: 10
In the given example, 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. Also, the symbol “↵” is a newline (return or enter keys).
Add exception handling to the answer for problem 3, so that if the input is not a number, the program prints an error message. In the second example, notice there are two decimal points (which is not allowed).
To turn in: Please turn in the program in the file ftoc-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 October 4, 2023 at 12:10AM
|
You can also obtain a PDF version of this. |