''' Purpose: demonstrate string acquisition (the getting of input) ''' # get input # input function is a function that gets the user's information by asking something the program needs # then the program outputs accordingly reply = input( 'Please provide text: ' ) # input() is a built-in function; no import needed # its argument (something inside () ) = instruction to the user - string! # leave a space after the colon # pauses the program until user types something and then hit the Enter/Return key # converts everything in your input into a STRING! ALWAYS --> stores it into the variable reply # the variable on that you want to store the input can be named anything # we tend to call it reply # if you type a number, the type of that is NOT a number type, it is a string!!! # ex: if you enter 1112 --> it will be represented as "1112" in the variable reply # "1112" is not an int, it is the string "1112" # if you don't type anything and click Enter, it is an empty string "" # an empty string does not have any characters in it # all input() does is that it gets text from the user print( 'Your reply was: ', reply ) # reply has the string version of whatever you typed # if you comment out the print() statements, it will not print out # Your reply was: ...... (whatever you typed) print() # get more input reply = input( 'Please provide more text: ' ) print( 'Your new reply was:', reply )