I get the correct translation, but still get error messages


#1



https://www.codecademy.com/en/courses/python-beginner-2W5v7/1/4?curriculum_id=4f89dab3d788890003000096


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


I consistently receive this error message on the Ending Up challenge. I cant figure out how to get around it, and any attempt I do make results in an incorrect translation. Can anyone help me out here?


pyg = 'ay'

original = raw_input('Enter a word:')

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

new_word = word[1:len(word)]
print new_word + first + pyg


#2

All that code should be where, print original is in the if statement.

Be sure to use new_word when creating your slice, which means building the string first, then slicing it and storing it back on the same variable. Then print the variable.


#3

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