''' Purpose: demonstrate string acquisition (the getting of input) ''' # get input # input() function # input() function takes in a single string prompt (like a question or something asking for user input) # 'Please provide text: ' is the prompt! # The user has to provide user input and hit enter in order to proceed to the next line or code # The user input is stored in reply # The input() function waits for user input, waits for them to hit enter, and whatever they # typed in is assigned to reply as a STRING. # so reply stores 'hello world' # reply is just a variable! We could've named it something else and the other variable name would # also hold the same string from input()! # If I just hit enter and didn't give it any input, reply is '' (empty string) reply = input( 'Please provide text: ' ) print( 'Your reply was: ', reply ) print() # IMPORTANT # print() IS NOT input()!!! # print() just prints it to the console # input() displays the text in the string BUT waits for user input to proceed # Not interchangable! # We will tell you when we want you to get user input vs. just print something # get more input # Now reply is reassigned to whatever the user typed the second time! reply = input( 'Please provide more text: ' ) print( 'Your new reply was:', reply ) # reply is now whatever we typed for the second prompt