user
Instruction:Generate a function to find the sum of the elements of a given array.

Input: [1, 4, 9, 0]


assistant
def SumArray(arr):
    sum = 0
    for element in arr:
        sum += element
    return sum