In utils.py
Write a function, daily_average(score1: int, score2: int, score3: int),
that calculates the average of three exercise scores and returns it as a number.
Example:
>>> daily_average(70, 80, 90)
80.0
In utils.py
Write a function, day_difference(today: float, yesterday: float),
that returns the difference between today's average and yesterday's average.
Example:
>>> day_difference(85.0, 80.0)
5.0
In utils.py
Write a function, performance_level(change: float) that returns:
- "Improved" if change is greater than 0
- "Stable" if change is equal to 0
- "Declined" if change is lower than 0
Example:
>>> performance_level(-3.5)
"Declined"
In main.py
Write a function, daily_trend(today1: int, today2: int, today3: int, yesterday1: int, yesterday2: int, yesterday3: int),
that calculates the averages of today and yesterday, finds the difference,
and returns the performance level as "Improved", "Stable", or "Declined".
Example:
>>> daily_trend(80, 85, 90, 75, 80, 85)
"Improved"
In utils.py
Write a function, weekly_improvement(avg1: float, avg2: float, avg3: float, avg4: float, avg5: float, avg6: float, avg7: float),
that calculates the total improvement during the week. Only count positive changes from one day to the next.
Example:
>>> weekly_improvement(70.0, 72.0, 75.0, 74.0, 78.0, 80.0, 79.0)
11.0
In main.py
Write a function, weekly_summary(avg1: float, avg2: float, avg3: float, avg4: float, avg5: float, avg6: float, avg7: float),
that computes the total weekly improvement and divides it by 7 to get a summary score.
Example:
>>> weekly_summary(70, 72, 75, 74, 78, 80, 79)
1.4285714285714286