def sym_maths(x,y):
list1 = ['+', '-', '*', '^']
input1 = input('Enter operator here: ')
if input1 == '+':
return x+y
elif input1 == '*':
return x * y
elif input1 == '-':
return x-y
else:
return x**y
Comments
Leave a comment