Project 22: Maximum 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 22:  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, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0