Exercise Set 10

Exercise 1 of 4

Finish the function.
def multiply(a, b):
  result = a * b
  # return the value of result here

print(multiply(4, 2))

Your code

Exercise 2 of 4

Finish the function.
def subtract(a, b):
  # find the value of a - b so you can return it
  return result

print(subtract(4, 2))

Your code

Exercise 3 of 4

Finish the function.
def power(a, b):
  # find the value of a raised to the power of b
  # return the result

print(power(4, 2))

Your code

Exercise 4 of 4

Write a function called divide to divide one number by another number.
print(divide(4, 2))

Your code