Question #250033

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


Expert's answer

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)
LATEST TUTORIALS
APPROVED BY CLIENTS