Please help me where is mistake


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

pyg = 'ay'
original = raw_input('Enter a word:')
word= original.lower()
first= word[0]
second = word[1]
third = word[2]
new_word = word[1:len(word)]
if len(original) > 0 and original.isalpha():
    print new_word + first +pyg 
    print 'empty'


This should follow immediately after the input. Follow the step by step instructions inside the if branch, and have only print "empty" in the else branch.


I tried to do this differently. Still getting the same error.
As per you I should have if statement just after the input , but what difference is it going to make to the logic ?


A big difference. We never leave validation to the end, but immediately after input. Read the instructions, and follow them to the letter. Where is your else:?


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