tylerb33 / ruby-random-squared

Practice with Ruby's pseudo-random number generator.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Squared Randoms

References

Instructions

  1. Using the Random class, generate a list of 20 random numbers between 0 and 49.
    prng = Random.new
    
    random_numbers = [...insert awesome code here...]
    puts(random_numbers)
    
  2. With the resulting array, build a new array that contains each number squared. For example, if the original list is [2, 5], the final list will be [4, 25].

About

Practice with Ruby's pseudo-random number generator.


Languages

Language:Ruby 100.0%