8-Word up


The error message says "did you create a variable called word?"

yg = 'ay'

original = raw_input('Enter a word:')

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

Replace this line with your code.


Few problems.


yg = 'ay' you mean pyg = 'ay' ?


word=original.lower() first=word[0]

don't put these at one line, (although you can put all codes at one line using semicolons but avoid it for now)
put them one by one inside the body of if clause and also make sure that all statements are spaced out by 4 space bars (we call it indentation, It helps us to structure our code.)

if len(original) > 0 and original.isalpha():
    word = original.lower() #and so on...

Read the exercise theory and instructions,try to go from starting exercise of this project.


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