Dice are also nice things to think about when wondering about probability. They're like coins, but a given die has six possible outcomes, not just two like a coin. Also, whereas a coin has a 50/50 chance of showing heads or tails, a given face on a die (1-6) has a $1/6$ chance of showing in any given roll.
Let's roll two dice here and see whay the chance is of coming up with two ones (or 'snake eyes').
Now you try. Finish the code to throw the dice N times. Edit it to look for two ones coming from the rolls and to count them properly if the ones appear.
Type your code here:
See your results here:
It works like this: each number on a die can generate 6 combinations. Two can generate $6^2$ or $36$ combinations. Why? Write out all scenarios
(1,1), (1,2), (1,3), (1,4), (1,5), and (1,6)
(2,1), (2,2), (2,3), (2,4), (2,5), and (2,6)
(3,1), (3,2), (3,3), (3,4), (3,5), and (3,6)
(4,1), (4,2), (4,3), (4,4), (4,5), and (4,6)
(5,1), (5,2), (5,3), (5,4), (5,5), and (5,6)
(6,1), (6,2), (6,3), (6,4), (6,5), and (6,6)
See? 36 possible combinations. Now, see how (1,1) is just 1 of the 36. This means there's a 1 in 36 chance of getting (1,1) or $1/36=0.027$ or $2.7\%$.
Rememeber also our theme here: "believable" probability always requires a large number of trials. Think of this when you choose your N.
Any thoughts on any other two combinations the dice could show? (Like 5 and 7?)
Share your code
Show a friend, family member, or teacher what you've done!