10. Ending up


#1



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

Error messages
File "python", line 11
else:
^
IndentationError: unexpected indent


Why isn't it working?


pyg = 'ay'

original = raw_input('Enter a word:')

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


#2

The else should be in line with the if.


#3

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