Question: I want it in python! Background One metric that we're all tracking these days is the daily count of new COVID cases in our respective




I want it in python!
Background One metric that we're all tracking these days is the daily count of new COVID cases in our respective jurisdictions. Another key metric is a seven-day average, and whether this week's average is higher or lower than last week's average. In this assignment, you will write a Python script to input daily case values and calculate weekly averages for them, comparing each week with the previous week. Problem Write a Python script that will: 1. Input a daily COVID-19 case count from the user. 2. Every seven days: a. Output the string 7-day average: X, where x is the seven- day average rounded to the nearest integer Write a Python script that will: 1. Input a daily COVID-19 case count from the user. 2. Every seven days: a. Output the string 7-day average: X, where x is the seven- day average rounded to the nearest integer. b. Compare this average to last week's average: . If this week's average is higher, print Average is higher than last week . If this week's average is lower, print Average is lower than last week . If this week's average is the same, print Average is the same as last week If this week's average is the same, print Average is the same as last week If this is the first week, don't print anything 3. Stop when the user enters an empty string for a case number. o If stopping in the middle of a week, print the current week's average as N-day average: X, where N is the number of days in the week so far and x is the average Also compare this average to last week's average, as above. An example of running your script could look like this: Daily cases? 10 Daily cases? 20 Daily cases? 12 Daily cases? 14 Daily cases? 16. An example of running your script could look like this: Daily cases? 10 Daily cases? 20 Daily cases? 12 Daily cases? 14 Daily cases? 16 Daily cases? 18 Daily cases? 20 7-day average: 16 Daily cases? 1 Daily cases? 2 Daily cases? 3 Daily cases? 4 Daily cases? 5 Daily cases? 6 Daily cases? 7 7-day average: 4 Average is lower than last week Daily cases? 1 Daily cases? 2 Daily cases? 3 3-day average: 2 Average is lower than last week
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
