input: Write a python function to calculate the sum of pairs of consecutive numbers using a for loop.
  assert calc_sum_pairs(5) == 35
  assert calc_sum_pairs(3) == 9
  assert calc_sum_pairs(10) == 330
output: def calc_sum_pairs(n):
      total = 0
      for i in range(1, n):
          total += i * (i + 1)
      return total