Stuck


#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'

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

What does it mean?


#2

Error:

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

have a look at this line of code

print new_word[1:len(new_word)]

you have to assign the slice to new_word variable.then you have to print the variable.


#3

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