-4
  1. What is the year and country that has the lowest life expectancy in the dataset?

  2. What is the year and country that has the highest life expectancy in the dataset?

  3. Allow the user to type in a year, then, find the average life expectancy for that year. Then find the country with the minimum and the one with the maximum life expectancies for that year.

The data set is a file i have on my computer, but i cannot put it in here. The file name is "life-expectancy.csv"

A sample run could look like:

Enter the year of interest: 1959

The overall max life expectancy is: 86.751 from Monaco in 2019 The overall min life expectancy is: 17.76 from Iceland in 1882

For the year 1959: The average life expectancy across all countries was 54.95 The max life expectancy was in Norway with 73.49 The min life expectancy was in Mali with 28.077

1 Answers1

0

First parse your csv file, and place all the information inside an object. After the user enters the year, you pull the object's information and print to the user. If you wanted, post your file to better help you.