10. Ending up


Hey guys! I'm having trouble getting the last part in ending up right. I've searched the forum, but can't find any help.

This is my code:

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 new_word[1:len(new_word)]
    print 'empty'

When I write for example cat, this is the error I get:
"Oops, try again. It looks like you printed the correct translation of "cat", but make sure to set new_word equal to the slice as well."
I have tried many things to solve this, but nothing I have tried works. Anyone that can help me?Preformatted text

Ending Up

this slice:


you should store in new_word (in essence updating the variable) and then print it


Thanks Stetim, I got it working now :slight_smile: