input: Write a function to read an array of integers and calculate their sum. The function should return the sum of the array elements.
  
  def calculate_sum(arr):
    sum = 0
    for i in arr:
      sum += i
    return sum
  
  assert calculate_sum([1, 3, 5, 7]) == 16
  assert calculate_sum([2, 4, 6, 8]) == 20
  assert calculate_sum([0, 0, 0, 0]) == 0
  assert calculate_sum([-1, -2, -3, -4]) == -10
  assert calculate_sum([]) == 0
output: def calculate_sum(arr):
    sum = 0
    for i in arr:
      sum += i
    return sum