Incorrect Output 11/11


#1

I finished the Pyg Latin translator lesson, but it's not giving me the correct output. For instance, if type in 'Hello', it'll print out 'Hello' instead of 'elloHay'. I put the code into the PyCharm IDE and it gave the same result. What am I doing wrong?

Here's 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)]
print original
else:
print 'empty'


#2

Look at what you tell your code to print exactly. Hint: It is not your new word. :smile: Well done.


#3

Well how about that! Had a total lightbulb moment there. Thanks for the help. :smile:

I printed 'new_word' instead of 'original' and that fixed it; FYI for everyone