input: Write a python function to calculate compound interest.
  assert compound_interest(1000, 0.03, 5) == 1159.2740743000003
  assert compound_interest(1500, 0.04, 3) == 1687.936
  assert compound_interest(2000, 0.05, 10) == 3257.7896825
output: def compound_interest(principal, rate, time):
      return principal * (1 + rate) ** time