White a function the will accept three arguments, two numbers and an operation sign among "+", "-", "/", and "x". The function s hould apply the operation on the two numbers and return the result to the caller. This is a basic calculator.
1 answer:
Answer:
Here you go :)
Explanation:
Change this however you'd like:
def calc(n1, op, n2):
if op.lower() == "x":
return n1*n2
elif op == "+":
return n1+n2
elif op == "-":
return n1-n2
elif op == "/":
return n1/n2
else:
return "error"
num1 = float(input("Input first number: "))
oper = input("Input operator: ")
num2 = float(input("Input second number: "))
print(calc(num1, oper, num2))
You might be interested in
D. Plot because a,b,and c is consider plot can i have brainlest answer please
Refer to the image below.
WHERE IS THE IMAGE!!!!
Answer:
Pattern Matching
Explanation:
Pattern matching in computer science is defined as the analysing & finding specific sequences of data of some pattern among raw data or a sequence of tokens.
Answer:
Also
Explanation:
Just checked it in the system
Answer:
I think the answer is 2.
hope it will help you