Word Up


#1



i added both variables and an error messge came up that i dont understand, its about indenting :confused:


File "python", line 8
print original
^
IndentationError: unexpected indent


i thought this would work because i added both variables inside the if statement :confused:


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

yes true, but look inside your if statement:

   word = original.lower
   first = word[0]
    print original

the indent of all this lines should be the same, this is not the case for the last two lines


#3

So, there is an identation error because the last line of your if statement does not match up with the rest of them. It should be something like:

word = original.lower
first = word[0]
print original


#4

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