Well, I got a question again that I was asked to generate random numbers from range 1 to 100, afterwards displays the list, that is higher the average of the list.
For example, if I generated 10 numbers in the list
[6, 21, 48, 17, 17, 76, 81, 92, 54, 100]
Average: 51.2
Output:
[76, 81, 92, 54, 100]
Alright, this is the simple part that I was able to solve. I wonder what if the average was 17, how would I avoid multiple numbers that are being repeated?
For example, if I generated 10 numbers in the list
[6, 21, 48, 17, 17, 76, 81, 92, 54, 100]
Average: 51.2
Output:
[76, 81, 92, 54, 100]
Alright, this is the simple part that I was able to solve. I wonder what if the average was 17, how would I avoid multiple numbers that are being repeated?