Program executing its task, but still getting error message!


The error message says, "Oops, try again. It looks like you printed the correct translation of "zebra", but make sure to set new_word equal to the slice as well.

Have I not set new_word equal to the slice? If I am wrong, what should new_word be equal to and what should I change?

pyg = 'ay'

original = raw_input('Enter a word:')

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


Instead of printing this line, create new_word right after first. When writing the slice, use new-word, not word.


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