If you increase the array size to say 25, the results are even more slanted see the attached file. https://files.engineering.com/getfile.aspx?folder=ff5e907d-3034-4346-b68a-b3fb7f7eff6a&file=capture
Actually, here is the code for the values, as the last post didn't randomize with a variable.
Dim myArray(6)
R =TIME$("milliseconds")
F$ = STR$(R)
R = VAL(RIGHT$(F$,2))
RANDOMIZE (R)
NumTosses = 1000
For Toss = 1 To NumTosses
TossValue = (Int((Rnd(1) * 6) + 1))
myArray(TossValue) =...
Actually I was running Just BASIC v2.0 Copyright 1992-2018 Shoptalk Systems
http://www.justbasic.com/download.html
The results I posted last time came from me running the MintJulep code with "no sort" in it. So as you can see, the percentage goes down from 1 to six. Here is the code. Can...
OK, I agree with you and I still have the question...…. IF you take code from MintJulep and run a million tries several times, it will show the results are consistently low for the number 6 compared to the other numbers see attached screen capture. How can that be true if it is purely random...
Thanks for the reply, but not sure I understand how it has one chance for Z=7 ? The other numbers all come up with a 16.66 percent hit except for the number 6 which consistently runs low. Confused.
I have written a small visual basic program that simulates a dice roll and tallies the results.
I seed the random number generator with the milliseconds value of time to start the program.
The results always have the number six come up less than the 16.66 percent than it should. Can someone...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.