mardi 16 avril 2019

generating a list of random numbers with a range and sum to a certain number

How could I make a list of N (say 3) random float numbers with range condition(say from 0.0 to 0.5), and that their sum is 1?

like [0.24, 0.31, 0.45]




Aucun commentaire:

Enregistrer un commentaire