round-robin

Python Weighted Random

Python Weighted Random Question: I need to return different values based on a weighted round-robin such that 1 in 20 gets A, 1 in 20 gets B, and the rest go to C. So: A => 5% B => 5% C => 90% Here’s a basic version that appears to work: import random x = …

Total answers: 4