''' Purpose: demonstrate string acquisition (the getting of input) ''' # get input reply1 = input( 'Tell me what is on your mind: ' ) # the space isn't TECHNICALLY needed, # but it helps us parse (break down) the user's input print() # prints a blank line print("You entered:", reply1) # reply stores whatever the user typed print() response = 'That is interesting. Why is "' + reply1 + '" on your mind? ' reply2 = input( response ) # input outputs the message inside the # parentheses; no need to print and then input; # input automatically prints it out print() print( 'Oooh.' ) # input is a built-in function # input takes input from the user before running a program # label_for_user_input = input("Message to user: ") # the user HAS to type SOMETHING for input to go on...even the Enter key works... # input will always hand back a string; user input will always be stored as a string when we use the input() function # + helps us put strings together just like , does except , automatically adds a # space after the previous string while + doesn't # you can use user inputs to control your code in many creative ways # we'll show you bits and pieces of that throughout the semester # variable = value # and all variables are identifiers # if you are coding and you want to change the name of a variable as you code it, # make sure that change is made THROUGHOUT YOUR PROGRAM # if you want to store a value to use later on, a great way of doing so is setting that value equal to a variable