How to choose one of the values with a certain probability?
📁 Advanced Python Topics, example
Example. Katya got 10 points, and Kolya got 20 points. So in one case out of three, Katya will win, and in two out of three, Kolya will win.
It is necessary to randomly choose the winner of the lottery, given their probabilities of winning.
What formula is used to calculate this (a universal formula for any number of lottery participants is needed)?
p.s. Python language.
No answers yet.
Log in to leave an answer