My code is marked as right, but it doesnt translate. Help?!


#1

Dear Python fellows,
I’m stuck here with the PygLatin game: my code is marked as correct, yet it simply won’t do what it’s supposed to do - translate the original word. Here is my 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)]
else:
print ‘empty’

Does anyone know what the problem is?

Thanks a lot in advance!

Best,
Loretta


#2

Remember to print new_word.


#3

Hey,
Thanks a lot! That was it :slight_smile:


#4

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