Corrected "while guess != code and guesses > 10:" with while guess != code and guesses < 10: