subject

In this programming assignment you are to create a program called numstat. py that reads a series of integer numbers from a file and determines and displays the following:

• The name of the file.

• The sum of the numbers.

• The count of how many numbers are in the file.

• The average of the numbers.

The average is the sum of the numbers divided by how many there are.

• The maximum value.

• The minimum value.

• The range of the values. The range is the maximum value minus the minimum value.

The program is to prompt the user for the name of the file that contains the numbers. If an exception occurs trying to open or read the file an error message is to be displayed. The program is not to crash if the file is not found or there is an error reading the file. Use try-except!

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:10, kristofwr3444
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, alexisbeasley2
Which of the following characters is acceptable to use in a filename? ? / – %
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, altstattlana
Read these lines from beowulf. often scyld scefing seized mead-benches from enemytroops, from many a clan, he terrified warriors, even thoughfirst he was found a waif, best explains why the author includes this information in theexposition? a. to emphasize that a hero must learn to be fierceb. to remember the famous story of a popular heroc. to express sadness about losing the old heroesd. to see whether people still respect the old heroes
Answers: 1
image
Computers and Technology, 24.06.2019 19:00, stephanieanaya7
In python a floating-point number must be written using scientific notation?
Answers: 1
You know the right answer?
In this programming assignment you are to create a program called numstat. py that reads a series of...

Questions in other subjects:

Konu
Chemistry, 12.11.2020 03:30
Konu
Mathematics, 12.11.2020 03:30