Question: Write an calculator function in Python. It accepts 3 parameters: integer operand 1 , integer operand 2 and a word which can be plus, minus,

Write an calculator function in Python.
It accepts 3 parameters: integer operand 1, integer operand 2 and a word which can be "plus", "minus", "multiply" and "divide"
Apply "plus", "minus", "multiply", and "divide" to operand 1 with operand 2, depends on the word.
Please note that 0 can NOT be a divider, please check it when you process "divide".
Print the result.
Call the function to test it.

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!