input: Write a python function to calculate the compound interest.
  assert compound_interest(1000, 9, 2)==1188.1
  assert compound_interest(5000, 5, 3)==5788.125
output: def compound_interest(principal, rate, time):
      amount = principal * (1 + rate / 100) ** time
      return round(amount, 3)