input: Write a function to calculate the compound interest based on the given investment amount, rate of interest, and time. If input values are invalid (like negative values), return -1.
  def compoundInterest(investment_amount, rate_of_interest, time):
      if investment_amount < 0 or rate_of_interest < 0 or time < 0:
          return -1
      compound_interest = investment_amount * (pow((1 + rate_of_interest / 100), time))
      return compound_interest
  
  assert compoundInterest(1000, 5, 5) == 1276.2815625
  assert compoundInterest(1500, 3.5, 7) == 1876.8835142488662
  assert compoundInterest(2000, 4.2, 10) == 2995.6024041087733
  assert compoundInterest(-1000, 5, 5) == -1
  assert compoundInterest(1000, -5, 5) == -1
  assert compoundInterest(1000, 5, -5) == -1
output: def compoundInterest(investment_amount, rate_of_interest, time):
      if investment_amount < 0 or rate_of_interest < 0 or time < 0:
          return -1
      compound_interest = investment_amount * (pow((1 + rate_of_interest / 100), time))
      return compound_interest