input: Write a function to calculate the total sum of all elements in the given list using a for loop. The function should take a list as its input and return the sum.
  def calculate_sum(data):
      total = 0
      for element in data:
          total += element
      return total
  
  assert calculate_sum([1, 9, 3, 5]) == 18
  assert calculate_sum([7, 2, 10, 4]) == 23
  assert calculate_sum([]) == 0
  assert calculate_sum([15, -5, 20]) == 30
  assert calculate_sum([0, 0, 0, 0]) == 0
output: def calculate_sum(data):
      total = 0
      for element in data:
          total += element
      return total