Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help using VS code/ python, image of 6-2-numbers.txt uploaded Average of Numbers (adapted from #6) - Save the file as ch6_ex2.py Write a program

Please help using VS code/ python, image of 6-2-numbers.txt uploaded

image text in transcribedimage text in transcribed

Average of Numbers (adapted from \#6) - Save the file as ch6_ex2.py Write a program that calculates the average of all the numbers stored in a file. Test the program using the following text file (download from BlackBoard assignment page): 6-2-numbers.txt Your program must: - Open the hard-coded designated file for reading - Use a loop to read all lines from the file - Count the number of lines in the file - Keep a running total of all the numbers in the file - Display the total, the number of lines, and the average of all numbers. - All numeric displays must have two decimal points, and the decimal points should align in the column - Close the file The output should look EXACTLY like the following: 2214374267560000971257

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

Explain the importance of Human Resource Management

Answered: 1 week ago

Question

Discuss the scope of Human Resource Management

Answered: 1 week ago

Question

Discuss the different types of leadership

Answered: 1 week ago

Question

Write a note on Organisation manuals

Answered: 1 week ago

Question

Define Scientific Management

Answered: 1 week ago