Day 574
Python do something based on probability
python - True or false output based on a probability - Stack Overflow mentions a really neat idea:
def decision(probability):
return random.random() < probability
Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus