How to choose one of the values with a certain probability?
📁 python, пример
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.
Ответов пока нет.
Войдите чтобы оставить ответ
Блоги
10 лучших фреймворков Rust для веб-разработки в 2024