Ending Up HELP!


yg = 'ay'

original = raw_input('Enter a word:')

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

Oops, try again. The value for the original variable looks off, make sure that you entered a word containing only letters.


what you want to do is check if the user inputs a valid sentence then what you want to do is process it and print **the new piglatin form of the input** meaning you have to move all your code logic after this line

print 'empty'

to the if block


Hey Rydan,

I took out print 'empty' I still got the same message


what i meant was keep that statement but move everything after it into the if block instead. So in the else you should only have the

print 'empty'

statement and every other statement in the if block


your first variable should be 'pyg' and not 'yg'.


I got the same problem with this section! It seems our codes are true but i dont know why this error appears!
here is mine
word=raw_input("enter a name")
if word.isalpha() and len(word)>0 :
print 'type only letters!'
print (new_word)