13 lines
221 B
Plaintext
13 lines
221 B
Plaintext
def randomNumber(k)
|
|
randomNumberArray=[]
|
|
randomNumberArray << 1
|
|
k= k - 1
|
|
|
|
while (k !=0 ) do
|
|
j = SecureRandom.random_number(2)
|
|
randomNumberArray << j
|
|
k = k - 1
|
|
end
|
|
return randomNumberArray.join
|
|
end
|