Help! What's wrong with my code?


This is the request:

Inside your if statement:
1.Create a new variable called word that holds the .lower()-case conversion of original.
2.Create a new variable called first that holds word[0], the first letter of word.

And this is my code:

pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
    print original
    print 'empty'

The system warns me that I didn't create a variable called word. But I had.
So what did I do wrong with it?


what word do you enter when prompted? it should be something valid


The wording here is tricky. Do you see in original = raw_input('Enter a word:') it mentions for 'Enter a word:' to enter "a" word? Basically, it's asking for you to enter one word. You can have it as short as "it" to as long as "supercalifragilisticexpealidocious," so long as it is one word.

That should help you move on!


Thank you so much. I know what you mean and how to deal with it. Thank for your help.


Yes, you are right. I ignored it. Thank you for help.


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