Ending up



File "python", line 6
word = original.lower()
IndentationError: expected an indented block

Replace this line with your code. 
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
print 'empty'


Python blocks are indented...

if ____:
    # code
    # code

The colon represents the opening of a block.


all the code that should part of the if clause should be indented:

if condition:
   print "i am part of the if clause"
print "i am not"


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