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

bookChallenge: Weekly Habit Tracker

Uppgift

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 allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Weekly Habit Tracker

Svep för att visa menyn

Uppgift

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

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

some-alt