Sectionย 1. Chapterย 5
single
Challenge: Weekly Habit Tracker
Swipe to show menu
Task
Swipe to start coding
Write a function that summarizes a daily habit tracked over a week. The function should process a list of daily values representing the habit's occurrences for each day of the week.
- Calculate the sum of all values in
daily_values. - Calculate the average of the values in
daily_values. - Print the weekly total.
- Print the weekly average.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat