Issues with "Word Up"


#1

File "python", line 8
else:
^
SyntaxError: invalid syntax

pyg = 'ay'

original = raw_input('Enter a word:')

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

`


#2

for some reason i took the "else" out which worked, i thought i would need this later in the program,right??
If anyone could tell me why this error message occurred that would be great!


#3

As you didn't posted properly (with indentation) so i cant tell you the exact cause of this.

but SyntaxError: invalid syntax can be cause of somthing missing in your code.maybe indentation too.
you can see the document


#4

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