Help me


#1



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


File "python", line 8
new_word = [1:len(orginal)]
^
SyntaxError: invalid syntax


Get solved


pyg = 'ay'
original = raw_input('Enter a word:')

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


#2

You don;t need this variable here,

And this variable,

should come before this one,

and this variable,

should reference

in order to get the desired PygLatin output,

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


#3

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