Ending Up


#1


https://www.codecademy.com/courses/python-beginner-2W5v7/1/4?curriculum_id=4f89dab3d788890003000096


pyg = 'ay'

original = raw_input('Enter a word:')

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

else:
    print 'invalid'
    
word = original.lower() 
first = word[0]
new_word = [1:len(new_word)]
print "N"


#2

new_word is not defined yet, so cannot be assigned.

Try this line first:

new_word = word + first + pyg

#3
 I tried the line new_word = word + first + pyg first, but my code doesn't run correctly.  Please advise.

#4

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

#5
 After I print new_word, my code still doesn't run correctly.  Please advise.

#6

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

Compare your code to the above. This is as close to the instructions as I can make it.