00:01
For this problem, we are asked to use a calculator or a computer with a random number generator.
00:06
We're then asked to simulate 100 throws of a fair die and to calculate the estimated probability that the result is a 6.
00:14
So i'm using wolfram mathematica, but i'll try to explain how the logic would work with any sort of programming utility.
00:21
What i'm going to do is start up a little code block where i'll have a 4 loop.
00:27
Now i'm going to double check the syntax.
00:29
So we have the start and then the test, increment, and body.
00:34
So let's say for i equals 1, the test is i less than or equal to 100.
00:43
And the next, what is the next part of the syntax here? let me just bring this back up.
00:50
Increment is going to be i++.
00:53
And now the body is going to be, let's say, we want to generate a number, which i'm just going to call num, and that's going to equal a random integer between 1 and 6...