In the board game monopoly, a player tosses two dices together and the sum of the two dices
points is the number of steps he or she should go. For example a player gets a 2 and a 3, then
he or she should go 5 steps forward. If the two dices give the same number (for example two
2), which is called a “double”, after moving forward (4 steps), the player gets another chance to
toss and move forward again. However, if someone tosses 3 consecutive doubles, he or she will
be sent to jail.
Consider that you are tossing two fair dices for many times. You won’t stop until you get 3
doubles. After you stop, take down the number of tosses you use. Use a loop to repeat this at
least 1000 times. Calculate the average of the 1000 results, that is, how many tosses is needed
on average, to be able to get three consecutive doubles.