Write a loop that accumulates the sum of the numbers in a li…