input: Write a function to calculate the compound interest given the investment amount, rate of interest, and time in years. If any of the inputs are invalid (e.g., negative values), return -1.
  assert compoundInterest(1000, 5, 5)==1276.28
  assert compoundInterest(2000, 6, 3)==2382.03
  assert compoundInterest(0, 5, 5)==0
  assert compoundInterest(1000, -5, 5)==-1
  assert compoundInterest(1000, 5, -5)==-1
output: def compoundInterest(amount, rate, time):
      if amount < 0 or rate < 0 or time < 0:
          return -1
      return round(amount * (1 + rate / 100) ** time, 2)