Menu

[Solved]Python Program Using Windows Notepad Similar Program Create File Called Numberstxt Folder Q37070055

Python Program:

Using Windows Notepad (or similar program), create a file calledNumbers.txt in your the same folder as your Pythonprogram. This file should contain a list on floating point numbers,one on each line. The number should be greater than zero but lessthan 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, nodecimal point). The other numbers should be displayed truncated tothe nearest thousandth (three digits to the right of the decimalpoint), with the decimal points aligned, and use the comma for thethousand separator. The count should be aligned with the othernumbers even though it is an integer (see screenshot).

The file may contain up to 1,000 numbers in it. Do not use anydirectory name in your file name, onlyNumbers.txt. add bigger numbers left and right ofdecimal 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’sactually easier to write without arrays (although it takes somemore thought up front).

Here’s an example of what your input and output should looklike:

Homework101) 2docx Protected View Saved to this PC jained chana四 File Home Insert Design Layout References Mailings Review Vi

Homework101) 2docx Protected View Saved to this PC jained chana四 File Home Insert Design Layout References Mailings Review View Help Tell me what you want to do PROIECIED VIEW 8e canetul iles from the Internet can contain vinuses. Unless you need to edit, It’s sater to stay in Protected view. Enable Editing Numbers.tot Notepad File Edit Format iew Help 527. 876 182.717 779.05 656. 771 32.772 369. 81 149.221 626. 851 416.181 178. 923 132. 3 543.474 965. 633 441.068 597.386 281.179 560. 852 877.433 113.988 676.757 Here’s an example of what your program should loak likr: Hint use the padding to figure out the spacing here… Count: Maximum: Minimum: Total: Average: 965.633 32.772 9,348.273 445.156 Page 2 of 3 528 words + 100% 950 AM O Type here to search 2019 Show transcribed image text Homework101) 2docx Protected View Saved to this PC jained chana四 File Home Insert Design Layout References Mailings Review View Help Tell me what you want to do PROIECIED VIEW 8e canetul iles from the Internet can contain vinuses. Unless you need to edit, It’s sater to stay in Protected view. Enable Editing Numbers.tot Notepad File Edit Format iew Help 527. 876 182.717 779.05 656. 771 32.772 369. 81 149.221 626. 851 416.181 178. 923 132. 3 543.474 965. 633 441.068 597.386 281.179 560. 852 877.433 113.988 676.757 Here’s an example of what your program should loak likr: Hint use the padding to figure out the spacing here… Count: Maximum: Minimum: Total: Average: 965.633 32.772 9,348.273 445.156 Page 2 of 3 528 words + 100% 950 AM O Type here to search 2019

Expert Answer


Answer to Python Program: Using Windows Notepad (or similar program), create a file called Numbers.txt in your the same folder as … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *