Unit 2 Task 21 - Solution

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Solution - Task 21: Weekly step average

← Back to task


One possible program:

total = 0

for day in range(7):
    steps = int(input("Steps for day " + str(day + 1) + ": "))
    total += steps

average = total / 7
print("Average steps per day:", average)