It automatically puts a 1 at the end because that is what you typed into the terminal. To verify this, try pressing backspace and seeing if you can delete the 1. If you type into the terminal when code is running, even if it isn't an input
function, it will remember what you typed and paste that in when an input
is called. To avoid this, simply don't have focus on the terminal when running and testing the code.