Else:


#1

My code is:
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
print new_word[1:len(new_word)
else:
print 'That\'s not a word!'
but every time I run the code I get the error message
File "python", line 10
else:
^
SyntaxError: invalid syntax
I've been working on this problem on and off for a few days now and any help would be appreciated


#2

When the compiler/interpreter say that something is wrong at the beginning of a line it might be a good idea to look at the one above it instead..


#3

I managed to fix the other problems in my code but I'm still getting the same error. Here is my new code everything works but the else:
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 = new_word[1:len(new_word)]
print new_word
else:
print "That'\s not a word!"