Question: Problem 1 - simple_calc.py: Basic calculator [10 points] In the previous assignment, you wrote multiply.py, which performed only one operation. Your new program should accept
![Problem 1 - simple_calc.py: Basic calculator [10 points] In the previous](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3ad807dae0_69666f3ad8013880.jpg)
Problem 1 - simple_calc.py: Basic calculator [10 points] In the previous assignment, you wrote multiply.py, which performed only one operation. Your new program should accept three arguments, where the first and last (third) are, again, floating point numbers, and the middle (second) argument is one of +, - *, /, or . For this program, should be taken to mean exponentiation. Your program should print the result of the arithmetic operation; e.g., for program arguments . 5 +-0.5", the output of your prograrn should be If the operator argument is not (exactly) one of these five possible string values, then your program should print Invalid operator. You do not need to check for division by zero. Practice goal: Practice with simple conditionals (and if-then-else "ladders"). Further familiarization with sys.argv
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
