I'm sorry but I cannot figure this out. PLEASE HELP!


#1



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


It says that the code did not run to end


I expected it to make a pig latin


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


#2

There is space between len and (new_word)
also make sure what lists youre slicing from
Its new_word


#3

It is still not working


#4

Hey, when we slice something we also put the sliced object before [] operator..

like if x is a list..

x = [1,2,3,4,5]
if I want to slice
I would do this..

x = x[1: 4]


#5

nvm I figured it out


#6

How ? What did you do ? I'm stuck


#7

Post your code so I can help you.


#8

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