• + 0 comments
    # Dice # 1
    dice_1 = [1, 2, 3, 4, 5, 6]
    
    # Dice # 2
    dice_2 = dice_1.copy()
    
    less_than_10 = 0
    all_outcomes = 0
    
    # Iterate through
    for v1 in dice_1:
        for v2 in dice_2:
    # add 1 for every pair to all_outcomes
            all_outcomes += 1
            if v1 + v2 < 10:
    # add 1 for pairs that summed up to 9 or below to less_than_10.
                less_than_10 += 1
    
    prob_less_than_10 = less_than_10 / all_outcomes
    print(prob_less_than_10)