Ending Up!/What is wrong with my code help!


#1



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


Oops, try again. Your code did not run to end - see the console window for the error message.


Replace this line with your code. 
pyg = 'ay'
original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = [1:neword + first + pyg
if len(original) > 0 and original.isalpha():
print original
else:
print 'empty'


#2

You don't need to slice here. You should remove the [1: in your line of code.
Also, as the instructions say, you it's best to nestle:

Under your if statement.
And, you forgot to follow this line of instruction:

Setnew_word equal to the slice from the 1st index all the way to the end ofnew_word. Use [1:len(new_word)] to do this.

Dont forget to indent your code under the if/else statements :slight_smile:


#3

thank you for help and patience :grinning:


#4

Sure, no problem. :thumbsup: :slight_smile:


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.