Example. Katya received 10 points, and Kolya & mdash; 20 points. So in one case, Katya will win out of three, and in two of the three & mdash; Kolya.
It is necessary to randomly choose the winner of the lottery, given their probabilities for winning.
What formula is it calculated (a universal formula for any number of lottery participants is needed)?
p.s. Python language.
question@mail.ru
·