input: Write a function to calculate the cumulative sum of a list.
  assert cumulative_sum([1, 2, 3, 4, 5])==[1, 3, 6, 10, 15]
  assert cumulative_sum([10, 20, 30, 40])==[10, 30, 60, 100]
  assert cumulative_sum([5, 15, 25, 35, 45])==[5, 20, 45, 80, 125]
output: def cumulative_sum(lst):
      cum_sum = []
      total = 0
      for num in lst:
          total += num
          cum_sum.append(total)
      return cum_sum