"word should contain the .lower()-case version of original" error



word should contain the .lower()-case version of original

I am getting an error saying that I need to have .lower()case version even though I have it in my code. When I enter an uppercase word, the output is in correct pig latin and lowercase.

original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
    pyg = 'ay'
    word = original.lower()
    first = word[0] 
    s = word 
    word = s[1:len(s)] 
    new_word = word + first + pyg
    print new_word
    print 'empty'


The lesson checker expects word to be unchanged in the program. Leave the slicing until after the new-word line. Both of those two lines may be removed.

new_word = new_word[...]


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