Question: Create a function (in PYTHON!) which will do arithmetic operations, - addition, subtraction, multiplication and division - based on the character input. The function will
Create a function (in PYTHON!) which will do arithmetic operations, - addition, subtraction, multiplication and division - based on the character input. The function will take 3 parameters: one integer value, one character and another integer value. The function will only return the calculation. If an invalid character is being entered it will return Invalid Operation
EXAMPLE PROGRAM RUN
(calculator 6, '+' ,2)
8
(calculator 6, '-' ,2)
4
(calculator 6, '*' ,2)
12
(calculator 6, '/' ,2)
3
(calculator 6, '&' ,2)
'Invalid operation'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
