2 Answers
+ 2
You need to create a variable to hold the total. Create that variable initially with 0 then use the 'for loop' and iterate over a 'range'. Inside the 'for loop' increment that total 'variable'.
Looks at hint in the task (it is shown in yellow box).
0
Suppose you have a list of invoices amounts and you wanted to sum them up and calculate the total amount...
invoices_amounts = [20.99, 5, 7, 10.99]
total_amount = 0
for amount in invoices_amounts:
total_amount += amount
print(total_amount)