Question: Create a Python file calc.py that: Repeatedly prompts the user for a prefix arithmetic expression The operators should be one of +, -, *, and
Create a Python file calc.py that:
- Repeatedly prompts the user for a prefix arithmetic expression
- The operators should be one of +, -, *, and /
- The result should be printed
- Use float() to convert the numeric values to numbers
- If non-numeric values are entered in place of expected numbers, an exception handler will catch the ValueError, print a message, and the program will terminate
Submit the Python file (.py)
***Please put code as typed with indentations, thank you in advance!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
