Complete lab 0 q 2

TODO: implement the sum of elements in a function