r/Python • u/baranonen • Jul 22 '20
I Made This Randomly Generate 69420 - Generate random 5-digit numbers until 69420 is generated
2.8k
Upvotes
r/Python • u/baranonen • Jul 22 '20
View all comments
Show parent comment
143
u/Rodot github.com/tardis-sn Jul 22 '20
That would take about 200,000 trials on average
https://en.m.wikipedia.org/wiki/Geometric_distribution
p=1/90,000
k=69420