Dont understand the error message


#1

Oops, try again. Did you create a variable called word?

pyg = 'ay'

original = raw_input('Enter a word:')

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

Printed
File "python", line 7
First= word[0]
^
IndentationError: unexpected indent


#2

There should be indentation on all lines inside the if code block. Be sure to use first not First.

else:
    print "empty"

#3

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