Answer:
numb1 = int(input('Enter a number one: '))
Operation = input('Enter operation: ')
numb2 = int(input('Enter a number two: '))
def Calculator(numb1, Operation, numb2):
if Operation == '+':
print(numb1+numb2)
elif Operation == '-':
print(numb1-numb2)
elif Operation == '×':
print(numb1*numb2)
elif Operation == '÷':
print(numb1/numb2)
elif Operation == '^':
print(numb1**numb2)
elif Operation == '//':
print(numb1//numb2)
elif Operation == '%':
print(numb1%numb2)
else:
print('Un supported operation')
Calculator(numb1, Operation, numb2)
Explan ation:
Write a Python Calculator function that takes two numbers and the operation and returns the result.
Operation Operator
Addition +
Subtraction -
Multiplication *
Division /
Power **
Remainder %
Divide as an integer //