input: Write a function to calculate the compound interest given the principal amount, rate of interest, and time period. The function should return the compound interest.
  
  assert compoundInterest(1000, 5, 5) == 1276.2815625
  assert compoundInterest(5000, 3, 10) == 6719.581895444688
  assert compoundInterest(2000, 7, 4) == 2654.0352194683916
  assert compoundInterest(1500, 4, 6) == 1924.2500614985995
  assert compoundInterest(10000, 6, 8) == 15938.480752944976
output: def compoundInterest(principal, rate, time):
      return principal * (1 + rate / 100) ** time - principal