Feb-05-2018, 08:50 PM
(This post was last modified: Feb-05-2018, 08:50 PM by sparkz_alot.)
(Feb-05-2018, 05:05 PM)Demini Wrote: >>>message = input("Tell me something, and I will repeat it back to you: ")
The input() to the right of the equal sign is the 'prompt' the user see's, 'message' to the left of the equal sign is the variable name that will hold the response to what the user enters at the prompt, in this case you should enter Hello Everyone! at the prompt, which is then saved in the variable 'message'. The line
print(message)
is saying print out the value held in variable 'message'.>>> message = input("Tell me something, and I will repeat it back to you: ") Tell me something, and I will repeat it back to you: Howdy parrot >>> print(message) Howdy parrot
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition