Site icon Tutor Bin

Function Deaths in Country Python Code

Function Deaths in Country Python Code

Description

  • All functions should read in the data from the provided csv file in order to compute the results.
  • The last comma separated value from of each line (Data.Rate) shows a country’s number of cases per 100,000 people on a rolling 14 day average. The function ave_infection_rate should calculate and return the average number of cases reported over 14 days per 100,000 people. That is, the average number of people worldwide with covid in a two week period.
  • The function countries_in_study should write a listing of country names and populations to a file. The lines of the file should be numbered, ordered by population, and formated as in the transcript sample output.txt.
  • The function deaths_in_country should, given a country, return the number of deaths reported there during the study
  • Function ave_infection_rate:
    • The global average for infection data rate is calculated and identified correctly.
  • Function countries_in_study:
    • The rankings are displayed correctly (1 through 210 to the left of each line)
    • The countries are listed in order from most populous (China) to least (Holy See)
    • Each line is formatted with the rank and country left justified, and the population right justified.
    • All countries are displayed once in the list.
    • The listing of countries and populations are saved to a file. (Alternatively, you could print the listing to the console window, but that way of doing it would not get these ten points.)
  • Function deaths_in_country:
    • The given country’s deaths from covid are identified correctly
  • Style and Quality:
    • The Python solution is of high quality: properly commented, and does not contain unnecessary code, and good style: easy to understand and done in a clean and straightforward way.
  • Honors Section: A function continental_death_tolls should report the percentage of each continent which has died of Covid-19 during the study. Continents: Africa, America, Asia, Europe, Oceania

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Exit mobile version