Year 8 · Python · Challenge 4

Weekly Step Count Tracker

Use parallel arrays for weekdays and steps to total activity, find peak and lowest days, and count low-activity days.

parallel arraystotalmax / mincount

Scenario: You are developing a feature for a fitness smartwatch. Step counts for one week are stored in a 1D array. A second parallel array holds the weekday names so you know which day each total belongs to.

Data

weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
step_count = [8200, 11500, 4300, 12000, 9500, 3100, 10500]

Your tasks

Implement the following without sum(), max(), min() or the .index() list method.

  1. Calculate the weekly total steps and print the total.
  2. Identify peak and lowest activity days — find the highest and lowest step counts and the matching weekday from the parallel array. Print both values with their days.
  3. Count low-activity days — fewer than 5,000 steps. Print the count.
💡 Try the whole challenge in your editor first. Only reveal the solution when you have had a proper go.

Previous: Challenge 3 · Year 8 Python