''' Purpose: consider string casing functions ''' text = input( 'Enter text: ' ) print() print( 'text:', text ) print() # produce case variants of input text # here we assign new versions of the string text in each different variable # variable = expression --> this is called an assignment statement text_c = text.capitalize() # capitalize() is a function --> puts the first letter in a string in uppercase # text_c gets capitalized version of the text text_l = text.lower() # lower() puts everything in lower case in a string # text_l gets the lowered version of the text text_u = text.upper() # upper() puts everything in upper case in a string # text_u gets the all uppercase version of text # THESE ARE ALL NEW VERSIONS OF THE STRING TEXT # these functions don't need arguments, just empty () # format: some_string.function_name() # THEY GIVE YOU A NEW VERSION OF A STRING; THEY DO NOT MODIFY THE ORIGINAL STRING !!!!!!!!!!!!!!!!! print( 'text.lower():', text_l, ' # all lower case' ) print( 'text.upper():', text_u, ' # all upper case' ) print( 'text.capitalize():', text_c, ' # initial character capitalized, rest lower case' ) print( 'text:', text ) # text remains the same version you input # make meaningful variable names! Make sure that you know what each variable stores # make sure you know the purpose of each variable! Try to have different variables for different purposes