Newby - is this what they are looking for ?? and is their a better a way
woodygar at sky.com
Tue Feb 24 13:54:28 CET 2009
1.What type of data will the input be? What type of data will the output be?
2.Get the phrase from the user.
3.Convert to upper case.
4.Divide the phrase into words.
5.Initialize a new empty list, letters.
6.Get the first letter of each word.
7.Append the first letter to the list letters.
8.Join the letters together, with no space between them.
9.Print the acronym.
Which of these steps is in a loop? What for statement controls this loop? '''
line = input('enter a phrase')
lines = line.upper()
seq = lines.split()
for i in seq:
word = (i)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list