Ending up


#1

What am I doing wrong?

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 [1:len(new_word)]
else:
    print 'empty'

#2

Not sure that we need to print the original word, but we should probably output the PygLatin version:

print new_word

#3
 new_word = word + first + pyg [1:len(new_word)]

This line looks a bit tricky. If wasn't too sleepy to think I would claim that this leads to trying to append pyg[1:len(new_word)] to new_word. You'd want something like:

new_word = word + first + pyg
new_word = new_word[1:len(new_word)]

#4

I have my code configured this way but i'm getting an error that asks "did you delete the first variable?"
but i'm pretty sure i never deleted the first variable. any advice?


#5

Hmm, that sounds a bit weird. Do you have a variable called "first" inside the function containing the first letter of the input word?