Machine Learning, Data Science.
of code we can write a function that makes this question trivial. def prob_of_roll_greater_than_equal_to(x, n_samples): geq = 0 for _ in range(n_samples): if roll_dice() >= x: geq += 1 probability = float(geq) / n_samples print('Probability of rolling greater than or equal to {0}: {1} ({2}