code refactored & now gives feedback on guesses

when you input a guess, it will tell you how close you are to the
correct answer. also, made the code cleaner.