Lesson 2 of 5 · 2 min
One pass is not a pass
Models vary from run to run. Run each case several times and report the rate.
import random
random.seed(1)
def flaky(): return random.random() < 0.8
for runs in (1, 5, 50):
wins = sum(flaky() for _ in range(runs))
print(f"{runs:3} runs: {wins / runs:.0%} success")
