PygLatin: Ending up


#1

So if i enter: Hello it will end up as Hellohay instead of Ellohay. Help? :smile:

pyg = 'ay'

original = raw_input('Enter a word:')

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


#2

This part of instruction is missing in your code
"Set new_word equal to the slice (...)"
You did slice new_word, but didn't assign it to anything


#3

arcplayer,

You have 'print' set to 'original', so it will print whatever you typed in, and you have it placed at the top of your 'if' statement.
You'll want to move 'print' to the end of your 'if', as it will be the last line read, and while it makes sense to simply print 'new_word[1:]', which will give you the correct result, the script will get angry because it wants you to pointlessly make an extra line of code reassigning 'new_word' to 'new_word[1:]', then print 'new_word'.

Raymond