Write a python function that will perform the basic calculation (addition, subtraction, multiplication and division) based on 3 arguments. They are: • Operator ('+', '-', 'T', **) • First Operand (any...


Write a python function that will perform the basic calculation (addition, subtraction, multiplication and division) based on 3 arguments. They are:<br>• Operator ('+', '-', 'T', **)<br>• First Operand (any number)<br>• Second Operand (any number)<br>Your first task is to take these arguments as user input and pass the values to the function parameters.<br>Your second task is to write a function and performs the calculation based on the given operator. Then, finally return the result in the function call and print the result.<br>Input:<br>

Extracted text: Write a python function that will perform the basic calculation (addition, subtraction, multiplication and division) based on 3 arguments. They are: • Operator ('+', '-', 'T', **) • First Operand (any number) • Second Operand (any number) Your first task is to take these arguments as user input and pass the values to the function parameters. Your second task is to write a function and performs the calculation based on the given operator. Then, finally return the result in the function call and print the result. Input: "+" 10 20 Function Call: function_name("+", 10, 20) Output: 30.0

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here