The code you've posted won't compile. You name your function psum in the first clause of your function definition and ppsum2 in the second. All clauses in a function definition have to use the same function name.
As for calculating the partial sums: Your first step should be to define a helper function that takes the sum up to now as a second argument. That should help you get to a solution.
PS: Did you also ask this question or was that someone else with the same assignment?