Ending Up HELP!


#1

yg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
print original
else:
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.


#2

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


#3

Hey Rydan,

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


#4

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


#5

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


#6

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
pyg='ay'
word=raw_input("enter a name")
word=word
if word.isalpha() and len(word)>0 :
word=word.lower()
else:
print 'type only letters!'
first=word[0]
pyg='ay'
new_word=word+first+pyg
new_word=new_word[1:len(new_word)]
print (new_word)