Strings Introduction Exercises

  1. What is displayed after the following code is interpreted?
    dish = 'pizza'
    dishStrLen = len( dish )
    
    print( 'Value of dish:', dish )
    print( 'Value of dishStrLen:', dishStrLen )
    print( 'Value of dish[1]:', dish[1] )
    
    pizzaType = "fruit"
    dessert = pizzaType + ' ' + dish
    print('Who would like some ' + dessert + '?')
    
  2. Write Python code to make a variable named response that references an empty string.