How to choose randomly in a certain ratio

前端 未结 5 607
醉话见心
醉话见心 2021-01-06 15:10

I want to choose randomly* between two alternatives with unequal probability.

For instance, when the user presses a button, 25% of the time it would make sound A and

5条回答
提交回复
热议问题