input: Write a function that reads an array of integers and calculates their sum. The function should return the sum of the elements in the array.
  
  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([10, 20, 30, 40]) == 100
  assert calculate_sum([0, 0, 0, 0]) == 0
  assert calculate_sum([-5, 5, -10, 10]) == 0
  assert calculate_sum([]) == 0
output: def calculate_sum(arr):
    sum = 0
    for i in arr:
      sum += i
    return sum