Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python The file you are reading contains a randomly generated list of numbers (it changes each time you run the tester). Each line within the

pythonimage text in transcribed

image text in transcribed

image text in transcribed

The file you are reading contains a randomly generated list of numbers (it changes each time you run the tester). Each line within the file contains one number, as in the example below. Your code must read each line, convert it to an integer, and analyze the contents, including: - The number of entries in the file - The total (sum) of all the entries - The average of the entries The last step is to write the three computed values above to a second output file, as shown below. The test case expects your code's output to match EXACTLY. You must print count, total, and average on separate lines, with the exact labels shown (including the colon) in that exact order for the test to pass-precision matters with files since future program must know the format before reading the data. The names for the input and output are variables at the top of the starter Python file. fimport random

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions