Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with acroym creating
#1
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

#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)
Reply


Messages In This Thread
Help with acroym creating - by n0003 - Jul-23-2017, 11:33 PM
RE: Help with acroym creating - by MTVDNA - Jul-23-2017, 11:56 PM
RE: Help with acroym creating - by ichabod801 - Jul-24-2017, 12:11 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020