you need to write it in the cmd window or terminal, or wherever you execute the script, i.e. where it prints
These are 2 different examples.
In first example you have 2 names (variables) -
In the second part of the example you take input from user and assign it value to name
What is your name?
These are 2 different examples.
In first example you have 2 names (variables) -
name
and surname
and then you print them.In the second part of the example you take input from user and assign it value to name
name
. Then it use this new value (or same value if you enter David) when it print the greeting. Note that it again uses input
as noted by @ndc85430, i.e. you need to press a key in order to finish the execution of the script
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs