''' Purpose: demonstrate string acquisition (the getting of input) ''' # get input reply = input( 'Tell me a favorite word: ' ) print() # compute length of word n = len( reply ) # reply stores the string of the user input so we store the length of reply in n # len( x ) # Finds the length of x # If x is a string, it tells you how many characters are in that string # ex. len('hello') is 5! # give feedback print( 'Did you know that "' + reply + '" has length', n ) # Recall from last class that + is the string concatenation operator # It glues strings together! # Also recall that , in print statements separate different types # So we printed a string , integer for the length # 'hello world' has 11 characters (includes the space since the space is a character!) # ANY user input is stored as a string in the variable the input() function is assigned to # variable = input('Type something: ') # variable stores WHATEVER the user typed as a string # input() function ALWAYS hands back a STRING of the user input! Write this down!!