Ending Up


#1

Hello,
I am having trouble with "Ending up" everything works perfectly fine but i get this:

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

I do not understand what or where a slice is. I have tried many things and everything breaks the program.


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)]
else:
    print 'empty'


#2

It says that the value you printed should go into a variable. (The task wasn't to print something, so while your result is right, your presentation of the result is wrong)
By looking at your prints you can determine which value that is, and then assign the mentioned variable to that value


#3

var original is already defined however the if statement is altering the final outcome of it. I hope this helps.


#5

Ah I see. That is very confusing. Why would you do it that was vs the way I did it?


#6

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