expert choice random number sound choice karaoke apun ka choice multiple choice questions multiple choice weighted standard deviation
Description - Weighted choice
Just a few lines of code if you are willing to use numpy. Uses FACT that any prob. distr. can be sampled by computing the cumulative distribution, drawing a random number from 0 to 1, and finding the x-value where that number is attained on the cumulative distribution. The searchsorted(..) function performs this search.