1# Python code to demonstrate the working of
2# sum()
3numbers = [1,2,3,4,5,1,4,5]
4
5# start parameter is not provided
6Sum = sum(numbers)
7print(Sum) # result is 25
8# start = 10
9Sum = sum(numbers, 10)
10print(Sum) # result is 10 +25 = 35
1def calculate_cards(cards):
2 total= 0
3 for card in cards:
4 total = total + card
5 return total
6print(calculate_cards([11,7,5]))