Function:

```
def comulative_sum(arr):
    arr1 = []
    for number in range(1, len(arr)):
        sum1 = 0
        for number1 in range(0, arr[number]):
            sum1 += number1
        arr1.append(sum1)
    return arr1
arr = [1, 2, 3, 4]
print(comulative_sum(arr))

```

Output:

```
[3, 6, 10]

```

Expected output:

```
[1, 3, 6, 10]

```

I have tried slicing ([1:], [0:number) instead of the range function. Still no results.