Spaces:
Sleeping
Sleeping
def add(x, y): | |
return x + y | |
def subtract(x, y): | |
return x - y | |
def multiply(x, y): | |
return x * y | |
def divide(x, y): | |
if y == 0: | |
return "Cannot divide by zero!" | |
return x / y | |
def greater(x,y): | |
if x > y: | |
return x | |
else: | |
return y | |
if __name__ == "__main__": | |
print("Select operation:") | |
print("1.Add") | |
print("2.Subtract") | |
print("3.Multiply") | |
print("4.Divide") | |
print(add(3,5)) | |