Need help on pyglatin 9/11


#1

This is my code:

pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word{0}
print original
new_word = word + first + pyg
else:
       print "empty"

it keeps saying there is a syntax error, but i cannot see one


#2

Assuming your indentation is correct, the syntax error may be here first = word{0}. I believe you need to use [] not {}.


#3

Your syntax error is simply that you put new_word = word + first + pyg
and
first = word (0) in the wrong places
When you do else/if you want to have what your are supposed to do directly after the else/if
example(italic is not part of the code)

code removed by moderator


#4

the word (then) is not part of the code)