Question: Write a program that generates 1 0 random integer numbers, each in the range of 1 through 1 0 0 , and assign each number

Write a program that generates 10 random integer numbers, each in the range
of 1 through 100, and assign each number to a list element. The program should display
the list and perform the following:
Ask the user to enter a number and determine whether the number is in the list. If
the number is in the list, display a message indicating the number is already in the
list. Otherwise, add the number to the end of the list.
Calculate the average of the values in the list and display the average rounded to
two decimal places.
Display how many numbers are above the average.
Display how many numbers are below the average.
Sample run 1:
Here is the list: [74,56,39,28,93,81,65,98,46,18]
What number should I add to the list? 10
Adding 10...
Here is the revised list: [74,56,39,28,93,81,65,98,46,18,10]
Average is: 55.27
There are 6 numbers above the average.
There are 5 numbers below the average.
Sample run 2:
Here is the list: [6,42,79,74,40,5,58,45,50,12]
What number should I add to the list? 40
40 is already in the list.
Average is: 41.10
There are 6 numbers above the average.
There are 4 numbers below 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 Programming Questions!