Start with a program that implements an easier task. Estimate the probability of throwing a six with a single dice. Make one million throws by putting a loop (1-1,000,000) in the program. The first problem is how to simulate a random dice throw. Use the function rand() for this purpose. Remember that rand() generates a number between 0 and 1. Multiply the result with 6 to get a number between 0 and 6. Compute the integer value of that number (int()) to get one of the numbers (0,1,2,3,4,5). rand() will never generate 1.0 so you can never get a 6 this way. Add 1 to the result to get one of the numbers (1,2,3,4,5,6). Test the result of this function. If it is equal to six then you should increase a second variable (for example with the name $successes). After the loop has completed, you should divide this variable by a million. Print the result. It should be about 0.167. When this version works properly then try to estimate the probability that someone throws a six with one of a maximum of three throws. Create a loop (1-3) which performs the dice throw three times. As soon as a six is thrown, the program should jump out of the loop. If no six is thrown in three attempts, the program should also leave the loop. Like before, you add 1 to the $successes variable when a six is thrown. After the main loop (1-1,000,000) is finished, divide $successes by a million and print the result. It should be about 0.421. Now you have a program which simulates playing Yathzee with one dice. The actual game is played with five dice. To simulate this, you need to put a loop (1-5) around the (1-3) loop. This loop should stop immediately when the (1-3) loop fails to produce a six. Only when the loop (1-5) finishes without a throw different from six, then the $successes variable should be increased. After the main loop (1-1,000,000) is finished, divide $successes by a million and print the result. It should be about 0.0133. This completes the exercise. You have written a program that simulates the actions of a Yathzee player trying to achieve five sixes. The only difference in style between the program and a common Yathzee player is that the program throws only one dice at a time rather than many of them. For the estimation of the probability, this does not make a difference.