''' Purpose: demonstrate string operators ''' # STRINGS CAN USE + and * but not for math! # name some values n = 5 s = 'strengths' t = 'crwth' u = 'unnoticeably' s_and_t_concatenated = s + t u_scaled_n_times = n * u print( s_and_t_concatenated ) # String concatenation (gluing strings together) # 'hi' + 'hello' = 'hihello' print( u_scaled_n_times ) # Copies of strings concatenated (glued together) # 'hi'*5 = 'hihihihihi' # Strings using + and * # '3'+'5' = '35' GLUES STRINGS TOGETHER NOT ADDS NUMBERS # '3' * 5 = '33333' # Numbers using + and * # 3 + 5 = 8 # 3 * 5 = 15 # str( x ) function # str( x ) function converts x to a string! # str( 3 ) -> '3'