Thinking in code · Working through a list

Count and total

How many orders were late, and how much did they come to? Both answers come from one walk through a list.