Challenge: Weekly Habit Tracker
Opgave
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.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 5
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 5.56
Challenge: Weekly Habit Tracker
Stryg for at vise menuen
Opgave
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.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 5
single