A group of friends compare their daily step counts. Their tracker app exports a grid of counts, but there are two versions of the app, and they lay the same table out differently:
rows_are | each row is… | each column is… |
|---|---|---|
"people" | one person | one day |
"days" | one day | one person |
Task: write step_report(steps, rows_are) returning a tuple (day_means, person_bests):
day_means — the average count on each day: one value per day, in day order, rounded to 4 decimal places,person_bests — each person's highest single-day count: one value per person, in person order.Return both as plain lists. Whichever way the table arrives, the answer for the same friends on the same days is the same.
Example
Ana and Ben over three days: three day averages, two personal bests.