The code will only exit the while loop when answer == secret. You do not too to check that answer == secret on line 20!