Whats wrong with my code?


#1



Replace this line with your 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= word[1:]
 
    print new_word
else:
    print 'empty'


#2

this line:

new_word= word[1:]

you take a slice of word (which still holds the original word the user entered), you should take a slice of new_word, which hold the pyglatin version of the user input


#3

Thanks a lot , codecademy is the best because of people like you , I was stuck on this for soo long lol !


#4

You took a slice of word, when it is suppose to be from new_word, as that sotred the translated version of the user's input in the previous line:

Fix the line I pointed out and you should be fine.


#5

pyg = 'ay'

original = raw_input('Enter a word:')

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

Please I don't understand what's wrong with this. They ask me if I created a new variable called new_world ?
And this is what I did


#6

Did you mean to type new_word? And what lesson are you on?


#7

Yeah
I'm at : 9.Move It On Back


#8

OMG i'm just BLIND
Thank you so so so so much, I was typing "world" instead of "word"
I didn't pay attention, I'm just a catastrophy :3 Thank you so much


#9

So that worked for you? And I'm glad to help. :slight_smile:


#10

Yeah thank you, I'll try to open my eyes next time haha