Generating Random Numbers
Supply the needed argument to #rand to generate a random number between 100 and 500. Hint: use Ruby 1.9.3 and ranges.
There is hidden code with assertions that is also being run to test out your 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
Back to Problems