Help please


i followed the instructions, but i get the wrong output. Can you please help me with this

pyg = 'ay'

original = raw_input('Enter a word:')

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


Here you're trying to slice the new_word without even defining it.

You have to assign new_word to concatenation of word,firstandpyg
then have to assign slice of new_word to itself.
then print it
(make sure that you do these steps one by one)


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