Lesson goal: Not getting a 7 or 11

Previous: Rolling a dice, twice | Home | Next: Introduction: Make a flashing animation

Let's roll a pair of dice two times. What is the probabiblity of not getting a 7 or 11 total on either of two tosses?

We'll set N equal to the number of rolls we'd like to make. Next, we'll set up a for-loop that will roll each die N times, add their numbers and see if the sum is $7$ or $11$.

Now you try. Choose a value for N, then fix the if statement to look for a sum of 7 or 11.

Type your code here:


See your results here: