Testing, Testing, is This Thing On?


#1

so this is my bit i wrote

pyg = 'ay'

original = raw_input('Enter a word:')

word = original.lower()

first = word [0]

new_word = word + first + pyg

new_word = new_word[1:]

if len(original) > 0 and original.isalpha():
print original
else:
print 'empty'

and it got me through the course but it never actually prints pig Latin. could someone tell me why?


#2

I printed the new_word instead of the original.

I also didn't make an if statement, which you did. My code:

original = raw_input('Enter a word:')

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