Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Generating Random Numbers : rand « Development « Ruby
Ruby
Development
rand
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