Skip to content

Sum a list

Sum a list

Add up every number in a list and return the total. Start a running total at 0, then loop over the list and add each value to it.

This pattern — a running total that grows inside a loop — comes up everywhere in programming.

Log in or create account

IGCSE & A-Level