PygLatin syntax error!


#1



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


syntax error: invalid syntax

The instructions told me exactly what to do, and I did them.


pyg = 'ay'

original = raw_input('Enter a word:')

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


#2

dude look at your variable before print you have world for the variable


#3

I fixed it and it wasn't the problem D:

pyg = 'ay'

original = raw_input('Enter a word:')

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


#4

We need an object to slice...

new_word[1:len(new_word)]

Note the spelling.


#5

Thanks! I guess I'm just bad at spelling xD


#6

The majority of errors we encounter are usually caused by something small.


#7

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