''' Purpose: demonstrate string acquisition (the getting of input) ''' # get input # Whatever we type after the prompt "Tell me what is on your mind: " is # going to be stored in reply. So if we type "fluttering butterflies" # reply stores the user input "fluttering butterflies" reply = input( 'Tell me what is on your mind: ' ) print() # Sooo what's with the + in the strings? That's concatenation! # Concatenation is when you glue strings together so that it can # form one big string with different string pieces. :) # The first and last part are string literals but reply is a variable # that stores a string so since all three are strings, we can glue em together # Notice how we made one big string prompt_for_more_info # as the single string prompt we pass into the input statement as our big prompt. prompt_for_more_info = 'Hmmm. Why is -- ' + reply + ' -- on your mind: ' reply = input( prompt_for_more_info ) # If you want to print something, you use the print() function. # BUT if you want to prompt for something (aka want user input), # use the input() function! Both display things to the console as output right? # But one of them (input) waits for the user to type something and hit # enter before proceeding. They are NOT interchangable. We will # ask you to prompt for something vs. just flat out print it out. print() response = 'Oh? I wish we had more time to chat. So long.' print( response )