In setup, wait until the port is ready. Once you get into the loop, enter something into the input box. The output could still be buffered, you could add some flush statements in the appropriate places.
Post the code again, you should have only added "//" in front of those two lines.
I highly recommend you get a copy of the Arduino Cookbook and skim it cover to cover and try the projects relative to yours.
Is this your first project? Have you tried any of the examples included with the IDE?
I am sorry to say I feel you are not quite ready to start the project at this point. We have no idea of your skill set or what resources you have available to you. I would suggest you start with some of the tutorials that are on line, sorry to say some are not so good but many are very good. Start by learning the basics, you will need to control outputs as well as interpret inputs such as reading a switch, receiving a message etc. Start with the LED, they are not expensive and there is even one on most of the Arduinos. At this point you should have also found several tutorials on basic electronics that you have gone through. You should acquire a copy of the Arduino Cookbook and go through that. I have no clue as to how fast you will learn this but it will probably take a few months.
In setup, after the Serial.begin, add a while statement similar to what is in your loop. Make SURE the Serial port is ready. I often AND it with a millis timer and if I drop thru restart the board.
After each Serial.print(ln), add a flush.
Hi @alija22. The sketch program starts running as soon as the upload finishes, or you reset or power the board. Any data the board prints to Serial between that time and when the Serial Monitor is started is lost. Your sketch prints "What is your name?" immediately after startup, so you might not see this message in Serial Monitor.
Upload your real sketch to the board again, then with Serial Monitor open, press and release the reset button on the board. Do you now see the expected "What is your name?" message printed in Serial Monitor?