Write a function that takes two numbers and perform all arithmetic operations.
Function should have default arguments set to 1, 1
● Addition
● Subtraction
● Division
● Multiplication
def arithmetic(x=1, y=1):
print('x+y =', x + y)
print('x-y =', x - y)
print('x*y =', x * y)
print('x/y =', x / y)
Comments
Leave a comment