""" acronym.py Input: a phrase from the user, i.e. "random access memory" Output: first letter of each word capitalized, i.e. "RAM" Jim Mahoney | Sep 2014 """ def main(): phrase = raw_input("What is the phrase? ") words = phrase.split() # print "words is ", words # uncomment to debug acronym = "" for word in words: # -- debug -- uncomment next lines to see debugging # print word, word[0], word[0].upper() # print acronym = acronym + word[0] upper_acronym = acronym.upper() print "Acronym is {}.".format(acronym.upper()) main()