input: Write a function to calculate the sum of elements in an array.
  assert sum_of_array([1, 2, 3, 4, 5])==15
  assert sum_of_array([10, 20, 30])==60
  assert sum_of_array([0, -1, 1, -2, 2])==0
output: def sum_of_array(arr):
      return sum(arr)