input: Write a function to calculate the compound interest based on the given investment amount, rate of interest, and time period. The function should return the computed compound interest. The given example should return the compound interest of an investment of 1000 units at a rate of 5% for 5 years.
  assert compoundInterest(1000, 5, 5)==1276.2815625000003
  assert compoundInterest(2000, 3, 10)==2687.832695596133
  assert compoundInterest(500, 7, 3)==612.5210000000001
  assert compoundInterest(100, 2, 20)==148.5947395978309
  assert compoundInterest(0, 5, 5)==0
output: def compoundInterest(principal, rate, time):
      return principal * (1 + rate / 100) ** time