Ending Up - Why I can't do like that?


#1

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'

I get the following error message:

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


#2

new_word needs to contain the final translation as well, after slicing


#3

So what code do you use? I'm stuck on this aswell


#4

the right one. I know that might looking mocking, but if you want help, please make a new topic with your:

code
error message
exercise url
question

so we can see where you have trouble understanding, and help you fill in the blanks to get to the right conclusion


#5

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