another implementation of selected random numbers from numbers in 1 to 49, which was an assign test in Chapter3