Generating Random Numbers

Submitted By:
david

Difficulty:
Easy

Tags:
rand

Instructions:
Supply the needed argument to #rand to generate a random number between 100 and 500. Hint: use Ruby 1.9.3 and ranges.

Hidden Code:
There is hidden code with assertions that is also being run to test out your code.

Code:
a = rand(___)
b = rand(___)
c = rand(___)
d = rand(___)

assert_equal (a > 99 && a < 501), true
assert_equal (b > 99 && b < 501), true
assert_equal (c > 99 && c < 501), true
assert_equal (d > 99 && d < 501), true

Your Solution

Ruby 1.9.3

Back to Problems