vendredi 29 mars 2019

Random number generator in Python when the mean is known

In Python, I am trying to get a list 50 random numbers between [0,100] that have a mean of 25. All the information I have is below.

Total = 250
Number_of_users = 10
Average_score = 25

In the past i have used the Gaussian function in random but without the standard deviation i am a bit stuck. Is there another way of doing it?

My output would be something like:

[20, 30, 18, 21, 27, 30, 15, 24, 31, 30]




Aucun commentaire:

Enregistrer un commentaire