def arr_sum(array):
    """
    definition: name( array[] ) {...}
    objective : returns the sum of all elements in the given array
    """
    sum = 0
    for element in array:
        sum += element
    return sum
