Checkpoint

Checkpoint: The Regatta Results

The great boat race around Pythonia is over! The judges have a list of sailors and a matching list of finishing times, in seconds. Help them post the results.

This checkpoint uses the whole chapter: zip, enumerate, sorted with a key, and any / sum.

Assignment

  1. podium(names, times) returns result lines like "1. Bo 41", fastest (smallest time) first.
    • Equal times are sorted by name, A to Z.
    • Number the lines from 1 with enumerate.
    • Pair the lists with zip(..., strict=True), so different lengths raise ValueError.
  2. anyone_under(times, limit) returns True if at least one time is below limit. Use any.
  3. average_time(times) returns the average time, rounded to 1 decimal place. Use sum.