input: Write a function to calculate the compound interest given the initial investment amount, the rate of interest, and the time period in years. The function should return the compound interest. If the investment amount, rate of interest, or time period is negative, the function should return 0.
  
  def compoundInterest(investment_amount, rate_of_interest, time):
      if investment_amount < 0 or rate_of_interest < 0 or time < 0:
          return 0
      compound_interest = investment_amount * (pow((1 + rate_of_interest / 100), time)) - investment_amount
      return compound_interest
  
  assert compoundInterest(1000, 5, 5) == 276.2815625000003
  assert compoundInterest(1500, 3.5, 7) == 413.00466322000056
  assert compoundInterest(-1000, 5, 5) == 0
  assert compoundInterest(1000, -5, 5) == 0
  assert compoundInterest(1000, 5, -5) == 0
output: def compoundInterest(investment_amount, rate_of_interest, time):
      if investment_amount < 0 or rate_of_interest < 0 or time < 0:
          return 0
      compound_interest = investment_amount * (pow((1 + rate_of_interest / 100), time)) - investment_amount
      return compound_interest