10. Ending Up


When I type an all uppercase word, it doesn’t return it lower cased…

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    word = original.lower()
    first = word[0]
    new_word = word + first + pyg
    print original
    print 'empty'


it does, but the lower case conversion is stored in word variable, you never print this variable. the only variable you print (original) still contains the original string entered by the user


So the program stores it lowercased but won’t show it when the pig latin phrase is printed?



it would, but you never print the pyglatin phrase.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.