Question: You are given a data file that includes people in various counties in the US who were affected by virus X. The individual responsible for

You are given a data file that includes people in various counties in the US who were affected by virus X. The individual responsible for data collection wasn't very familiar with the interface of the notepad and might have listed numbers from several counties on one line, instead of one on each line. Therefore, each line in the file will include the integers representing the number of affected people per country.

Your task is to write a program that reads the file, extract the number of affected people, compute /identify the following:

1. sample mean of the data;

2. minimum number of affected people;

3. maximum number of affected people;

4. total number of counties reported

The program should print the computed values along with the number of people in the sample along to the screen. Make sure that the printed output is labeled so that the user knows which values are which. The sample data file is named 'data.txt'. Note that we do not want you to use the built-in sum(), min(), or max() functions or numpy (or another package - including simple_ds.py) to compute the values - we want you to compute these yourself (in the code) using the algorithms previously developed in class and for homework. Use 3 decimal points of accuracy when printing the results.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!