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, 22.06.2019 03:30
Jessie has received a contract to build a real-time application for a baker. however, the baker doesn't want to invest too much money. his only requirement is that he wants the customers to know which cupcakes are available at what time and in what quantity. so his core requirement is that the details of product should be in real time. what platform can jessie use to develop this application?
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
What season was better from fortnite?
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
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
Social Studies, 17.02.2021 01:00
question
History, 17.02.2021 01:00