Skip to main content

Stats and First Match

Challenge on lesson: Checkpoint: Loops

Implement total(scores) (sum of all elements), average(scores) (0 when empty), and first_below(scores, limit) returning the INDEX of the first element below limit, or -1 if none.

Difficulty: beginner

Back to lesson: Checkpoint: Loops