Getting user input like with Java's Scanner

Hi! Thanks for the fast answer.
I tried to take a screenshot of what’s happening, hoping it’s clearer than what I wrote. I’m sorry for that