Ruby Ruby Loops Ruby Loops Loop Conditionals

melissa brown
melissa brown
4,670 Points

random number inside the loop?

why dont we put the random_number = random.new.rand(5) inside the loop?

2 Answers

Damian Kosowski
Damian Kosowski
19,746 Points

If you put the expression < random_number = random.new.rand(5) > inside the loop it will generate a different random number on every turn. It would be harder for the contestant ;)