Question: writing a function using procedures

Write a function to compute the n-th partial sum of the alternating series

Specifically, the procedure takes n as input, and returns the sum of the first n terms. 
Can someone help me with this? I'm not very good at using procedures.
Please Wait...