Project 23: Max of Three Dice

Suppose you were to roll three fair dice.  What is the probability that the maximum of the three dice is 5 or greater?

Project 23:  Simulate MANY (at least 100,000) trials of rolling three dice.  Estimate the probability that the maximum of the three dice is 5 or greater.

Task: Appropriately assign the value to 'proportion' that represents the probability.


Note: There are two working randomization methods available to use.


random() returns a random number from [0,1)


Example: r = random();  //r holds a value between 0 and 1 (not including 1).


randomInt(lower, upper) returns a random integer between lower and upper inclusive


Example: i = randomInt(2,7); //i holds one of the values: 2, 3, 4, 5, 6, 7 and they are all equally likely

**If your code works for 5 test cases in a row, you can enter your e-mail address.