Python, Random Numbers, Monte Carlo Simulation, Data Science, Probability.
0.20. In other words, if I draw balls (with replacement) from the bag a large number of times (say, 100), then 20 of those would be green. Let’s test it programmatically. green_ball_count = 0 for i in range(0,100): new_ball = random.choice(['g', 'r', 'r', 'r', 'r']) if new_ball == 'g':