Inputting a String
Remember that a string is a collection of alphanumeric characters (letters, numbers and punctuation) such as: “Wednesday”, “The Avengers 2: Age of Ultron”, “Boeing 747”. You must include speech marks when writing a string.
We use the input command to ask a question and let a user input data. After input you write your question in brackets and speech marks – like when printing. The user’s answer must be saved into a variable (e.g. name) which is written first.
You can then use that variable for all sorts, such as printing it within a sentence:
And when we run this program (F5) it will look like this:
The variable name can be whatever you want, just choose something appropriate: