#Write a function make_acronym that takes a phrase (string) as a parameter, #and returns a new string containing # the first letter of each word, in upper case. #For example, if the string "computer science investigation" #is passed as a parameter, the function should return "CSI". def make_acronym(phrase): '''(str) -> str Accept a phrase as a parameter and return a string consisting of the first letters of each word, capitalized. ''' acronym = '' words = phrase.split() for i in range(len(words)): acronym += words[i].upper()[0] return acronym # another way def make_acronym(phrase): acronym = '' for word in phrase.split(): acronym += word[0].upper() return acronym #Write a function remove_article_words that takes a sentence #(a string) as a parameter and returns a new sentence in which #any articles are removed from the sentence #(i.e., remove 'a', 'and', and 'the' words from the sentence). #Your function should work for any capitalization of those words. def remove_article_words(sentence): '''(str) -> str Accept a string sentence as a parameter. Construct and return a new string in which the words 'a', 'and', and 'the' are removed from sentence. ''' new_words = [] for word in sentence.split(): if word.lower() not in ['a','and','the']: new_words += [ word ] return ' '.join(new_words)