Question: Create a program that first asks the user to enter a number of values and writes them to a txt file (not pickle or json).

Create a program that first asks the user to enter a number of values and writes them to a txt file (not pickle or json). Then the program reads the file and stores the numbers into a list. The program then outputs the average and how many numbers are above the average.

You can ask the user to enter the number of values to enter first. For example, if the user enters 5 values and then enters the values one at a time (e.g. 2, 2, 3, 4, 4). The program can write 2,2,3,4,4 to the file. After reading the file to a list (not using the original list before writing to the file), the program will show the output of an average of 3 and there are 2 values greater than the average.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!