└── zero /zero: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | # Probability of getting a zero on a single spin 4 | prob_zero = 1/37 5 | 6 | # Calculate the probability of getting a zero three times in a row 7 | prob_three_zeros = prob_zero**3 8 | 9 | print("The probability of getting a zero three times in a row is:", prob_three_zeros) 10 | print("Approximately:", math.ceil(1/prob_three_zeros), "spins") 11 | --------------------------------------------------------------------------------