Skip to content

Program-2.py

1
2
3
4
5
6
7
8
9
# Problem 2 : Find the Sum and Average of List Elements.

lst = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

sumOfList = sum(lst)
averageOfList = sumOfList / len(lst)

print("Sum of List Elements : ", sumOfList)
print("Average of List Elements : ", averageOfList)