Thats because you press the enter key and 1st output is for the letter you typeand second for the ENTER key pressed.