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