Need Help with pyglatin


#1



Pyg Latin


Cursor keeps on processing but the code is not being executed


Can someone help, where I am going wrong.

Below 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[1:] + first + pyg
    print new_word
else:
    print 'empty'


#2

Could be wrong but I think it's just because it should be word[1] not word [1:] at this stage


#3

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'


#4

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