I am a new student to Ruby and am looking for some input on which
practices I should be following. I realize there will always be a number
of ways to approach different situations, but I am wondering if there
are incorrect ways to approach problems.
For my example, I have attached two “working” loop programs in which you
guess a number the computer is thinking between 0 and 10.
My question is it wrong in this situation of looping to use break to end
the loop early if the answer is right so the program does not repeat the
incorrect response when the answer is right. Or should I be using the
condition method to accomplish this as in the other example?
Both programs run identically.