Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Weekly Habit Tracker | Everyday Calculations and Automation
Python for Daily Tasks

bookChallenge: Weekly Habit Tracker

Tâche

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

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 5
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Weekly Habit Tracker

Glissez pour afficher le menu

Tâche

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

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 5
single

single

some-alt