Question: Using Windows Notepad (or similar program), create a file called Numbers.txt in your the same folder as your Python program. This file should contain a
Using Windows Notepad (or similar program), create a file called Numbers.txt in your the same folder as your Python program. This file should contain a list on floating point numbers, one on each line. The number should be greater than zero but less than one million.
Your program should read the following and display:
The number of numbers in the file (i.e. count them) (counter)
The maximum number in the file (maximum)
The minimum number in the file (minimum)
The total of all the numbers in the file (total)
The average of all the numbers in the file (average)
The count should be displayed as an integer (a whole number, no decimal point). The other numbers should be displayed truncated to the nearest thousandth (three digits to the right of the decimal point), with the decimal points aligned, and use the comma for the thousand separator. The count should be aligned with the other numbers even though it is an integer (see screenshot).
The file may contain up to 1,000 numbers in it. Do not use any directory name in your file name, only Numbers.txt. add bigger numbers left and right of decimal point to the created numbers file.
The file will contain only lines with numbers. There will not be a blank line at the end of the file.
Do not use arrays for this assignment. It's actually easier to write without arrays (although it takes some more thought up front).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
