Lesson goal: Throw some dice

Previous: Two coin tosses (2) | Home | Next: Rolling a die until a 6 comes up

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: