Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. BadbeatBurley

    Visual Basic Random Number not so Random?

    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
  2. BadbeatBurley

    Visual Basic Random Number not so Random?

    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) =...
  3. BadbeatBurley

    Visual Basic Random Number not so Random?

    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...
  4. BadbeatBurley

    Visual Basic Random Number not so Random?

    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...
  5. BadbeatBurley

    Visual Basic Random Number not so 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.
  6. BadbeatBurley

    Visual Basic Random Number not so Random?

    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...

Part and Inventory Search

Back
Top