Question: How to input code to calculation basic mathematics in Python 3 add by using a statement: ADD N1 AND N2 subtract by using a statement:

How to input code to calculation basic mathematics in Python 3 add by using a statement: ADD N1 AND N2 subtract by using a statement: SUB N2 FROM N1 multiply by using a statement: MUL N1 BY N2 divide by using a statement: DIV N1 BY N2 Note N1 and N2 are operands - any numbers you wish. ADD, SUB, MUL and DIV are four operators. AND, FROM and BY are two keywords. Operators and keywords can be lowercase or mixed case. . N2 should not be zero if the operation is DIV! . We cannot use the built-in functions eval) or exec). We cannot use break or continue or pass or sys.exit() in our Python program . We must ask the user for the equation using only one call to the built-in function input(). We cannot ask the user to enter operands and operators individually #The program output #when user input ADD 32 AND 8, the program output the answer. Enter an arithmetic statement or 'Q' or 'q' to Quit the Calculator: ADD 32 AND 8 Answer: ADD 32 AND 8- 40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
