How to find input as operation
Explain:
It is subtraction operator given two numbers -150 - -100
Input:
-150 - -100
Output:
50
Input:
150 + 50
Output:
250
def sub_add(num1, num2):
if num1 < and num2 < 0:
return abs(num1-num2)
else:
return num1 + num2
Comments
Leave a comment