Question: Probability of success with loop does not match binomial result?

I created a loop to calculate, using random numbers, the probability of a die roll. I got 0, which I originally attributed to the fact that the probability might have just been that low, but in comparing it to a binomial distribution, it shouldn't be 0.

I tried editing the loop to do a coin toss instead, where the probability is 0.5, and that worked fine. So I don't think my loop structure is necessarily wrong. But perhaps I wrongly input getting a 0.167 probability somehow.

Any advice would be appreciated!

dierollfail.mw

Please Wait...