Pyg Latin: Move it on back Help!


#1

PygLatin is supposed to not have the first letter because it is moved to the end, correct? Cus mine says something different.
Here is my code:

pyg = 'ay'

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

But then I get this error:
Oops, try again. It looks like new_word equals "iffusionday" instead of "diffusionday"!
but the d in diffusion is supposed to be moved to the end.

Grateful for any help. Thanks.


#2

Here is what I did:

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 
    print new_word
else:
    print 'empty'

I think the order in which you wrote your code was just off a little, I hope I help!


#3

Cool, thanks for the help!