Year 8 · Python · Challenge 1

Weekly App Usage Analysis

Use a 1D list and loops to total, find the max and min, and count high-usage days — without sum(), max() or min().

1D arraytotalmax / mincount

Scenario: You are developing a feature for a mobile operating system that helps users track their daily screen time. The screen time for one week is recorded in a 1D array, where each element represents the number of minutes spent on an app per day.

You have been given the screen time data for a popular social media app over a period of 7 days.

Data

screen_time = [120, 85, 240, 90, 150, 60, 180]

Your tasks

Write a Python program to analyse this data. Implement the following without using built-in functions like sum(), max() or min().

  1. Calculate the total screen time — iterate through screen_time and print the total minutes for the week.
  2. Find the maximum and minimum screen time — print both the highest and lowest single-day values.
  3. Count high-usage days — a high-usage day is more than two hours (more than 120 minutes). Print how many days meet this rule.
💡 Try the whole challenge in your editor first. Only reveal the solution when you have had a proper go.

Year 8 Python · Next: Challenge 2