Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

What is a null value? What gives rise to null values in a relation?

Answered: 1 week ago

Question

7. Explain why retirees may be valuable as part-time employees.

Answered: 1 week ago

Question

3. Provide advice on how to help a plateaued employee.

Answered: 1 week ago