Your question is Simulate Dice Sum Probability. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A simulation has already rolled two fair six-sided dice for you, once per trial. You are given the outcomes as a list rolls, where each element is a two-element list [die1, die2] and each die value is an integer from 1 to 6.
Write a Python function that returns the empirical probability that the sum of the two dice is 7: the fraction of rolls whose values sum to 7, returned as a floating-point number.
def empirical_probability_sum_seven(rolls):