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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
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
question
Mathematics, 08.12.2020 01:10
question
English, 08.12.2020 01:10
question
Geography, 08.12.2020 01:10
Questions on the website: 13722367