What did I do wrong with my code?


#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
    new_word=new_word[1:len(new_word)]
    print original
else:
    print 'empty'

So I completed the course and passed every lesson, but my PygLatin translator just returns the inputted word!! I enter "python" and the translator just returns "python"!!

Could someone please explain to me what I did wrong?


#2

Hi
Your translator returns original word because you told him to do that.
Can you see where mistake is?


#3

Oh haha yeah. Thanks I'll fix it :smile: :+1: