Question: write a Python program, call it scicalc.py , to evaluate an arithmetic expression provided as input in one of the following form: + ( 1

write a Python program, call it scicalc.py, to evaluate an arithmetic expression provided as input in one of the following form:
+(12,2.5) : (i.e.12.5 plus 2.5)
-(7,0.5) : (i.e.7 minus 0.5)
*(5,4.9) : (i.e.5 times 4.9)
/(67,16.5) : (i.e.67 divided by 16.5)
%(27,8) : (remainder of the division of 27 by 8)
The program must work correctly for any arbitrary real numbers used in the arithmetic expression and irrespective of the number of the number spaces seperating the different elements of the input expression. For example, the expression +(12.5,2.5) should still yield 15.
Note the following:
1. The format of the input string must be as specified above
2. The solution must not use any contracts that we have not studied, including if statments, Boolean expressions and their evaluations, while statments, dictionaries, functions, and library/module imports

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!