Final guess.rb for homework tonight

I felt like I was making good progress but I have to call it quits for tonight. Made it through level two and was starting to work out the loops. Seems like it could be streamlined. But I'm going to get some sleep.
This could be much more DRY - lines 11 to 30 are almost identical to lines 32 to 51, and there's also repetition within these two sections. Try to think of a way to accomplish this behavior using a loop.