Generating Random Numbers : rand « Development « Ruby






Generating Random Numbers




puts rand    # => 0.517297883846589
puts rand    # => 0.946962603814814

 








Related examples in the same category

1.Random with a range
2.Get a random item in an array
3.Get a random value in a hash
4.Generate random numbers
5.Some random numbers based on process number and current time
6.Start the seed with the number 1