Jul-23-2017, 11:33 PM
I have a homework question that states the following:
An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For example, RAM is an acronym for “random access memory.” Write a well-documented Python program that allows the user to type in a phrase and then outputs the acronym for that phrase. The acronym should be all uppercase, even if the words in the phrase are not capitalized.
But I'm stuck on it, I don't know if I am doing it right but this it was I have so far
An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For example, RAM is an acronym for “random access memory.” Write a well-documented Python program that allows the user to type in a phrase and then outputs the acronym for that phrase. The acronym should be all uppercase, even if the words in the phrase are not capitalized.
But I'm stuck on it, I don't know if I am doing it right but this it was I have so far
#Ask for word w = input("Type in word to create acronym with spaces between the words") #Seperate the words to create acronym s = w.split(" ") letter = s[0] #print answer print s.upper(letter)