Problem with Python PygLatin


Hi! I was finishing up my python pygLatin translator, and came to the testing, testing part of the task. Everything has been working out just fine before, but all of a suddent my code wont work!

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 ‘empty’

could anybody help me understand what went wrong?


what output does it give?


It does not give an output! The input (write a word) part shows up, but when I’ve written an word and pressed enter, nothing happens


I looked over the code and I believe that you forgot your “print” in the code.


Yes, pythoncoderboy is correct, there should be a:

print ‘new_word’ inside the if statement


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