Pig Latin Translator


Everytime I run this, I get a correct and it tells me that I pass the course. However it never actually takes the letters and moves them around like it is suppose to. For example, if I enter "python" then it returns "python" and whenever I run the code in IDLE I get paraenthesis errors, even though in codeacademy it tells me I am correct.

I mostly just want to understand what I am doing wrong and/or how idle is different? I want to learn why it works the way it does or doesnt and to do that I need to understand where I am going wrong. Thankyou in advance.


Replace this line with your code.

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
print 'empty'


On this line next to this statement [1:len(new_word)] , You should type in word before it and not new_word.


So it would be "new_word = word[1:len(new_word)]"?? I just tried it and got the same thing. A pass but no reassembling of letters. Thankyou by the way for the quick reply


Oh wait after doing that also add first and pyg to this statement. word[1:len(new_word)]