input: Write a function that calculates the compound interest based on the given investment amount, rate of interest, and time period. The function should return the compound interest as a float value.
  assert compoundInterest(1000, 5, 5) == 1276.2815625
  assert compoundInterest(2000, 3, 10) == 2687.8326450145313
  assert compoundInterest(500, 7, 3) == 612.5210000000001
  assert compoundInterest(100, 2, 1) == 102.0
  assert compoundInterest(800, 4, 0) == 800.0
output: def compoundInterest(principal, rate, time):
      return principal * (1 + rate / 100) ** time