Created
February 21, 2012 06:19
-
-
Save havesolutions/1874181 to your computer and use it in GitHub Desktop.
sample function output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p290 :082 > a = [1,2,3,4,5] | |
=> [1, 2, 3, 4, 5] | |
ruby-1.9.2-p290 :083 > a.sample | |
=> 5 | |
ruby-1.9.2-p290 :084 > a.sample | |
=> 4 | |
ruby-1.9.2-p290 :085 > a.sample | |
=> 5 | |
ruby-1.9.2-p290 :086 > a.sample | |
=> 4 | |
ruby-1.9.2-p290 :087 > a.sample | |
=> 5 | |
ruby-1.9.2-p290 :088 > a.sample | |
=> 4 | |
ruby-1.9.2-p290 :089 > a.sample | |
=> 2 | |
ruby-1.9.2-p290 :090 > a.sample | |
=> 3 | |
--- | |
Here I am trying to generate the random numbers with high randomness, if you see the above example you will see after 5 4 is coming but again 5 is coming this should not happen instad randomness of numbers should be high | |
Can any one has any idea. | |
Thanks | |
D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment