Trouble with 9/10 what's wrong with my code?


#1



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

my code doesn't print the word. for example: when click save and continue it asked me to type in a word.

so I type in hello. This is what shows up
"Enter a word: hello
hello
None "


isn't it supposed to say "ellohay"?? what's wrong with my code?


pyg = 'ay'

original = raw_input('Enter a word:')

word = original.lower ()

first = word[0]

new_word = word + first + pyg

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


#2

You are missing the line that reverses and adds ay to the user's input.


#3

Thank you for the suggestion. what is that line that reverses and adds ay to the user's input?


#4

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

the only change between the first line and this one is,

[1:len(new_word)]


#5

@webace95337
I would suggest reading
http://stackoverflow.com/questions/509211/explain-pythons-slice-notation


#6

Was that for me or @webace95337