Word up


#1

help ..............
my code is giving me errors, it keeps saying, did u create a variable called word?
I've tried every possible code, stuck on this for almost 2 months now.........

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

@jkyereh: Josh, I've tried your code and passed the lesson.
Have you tried refreshing the page or trying in a different browser?


#3

i thought as much, cus I can't really find any error with my code, I've tried everything else, refreshing the page, closing and restarting my broswer, all that.............and it keeps saying I haven't created a variable called word.........
anyway, thanks bro......


#4

it finally went through.................. no one told me debugging was gonna be this hard.......
debugging is no joke..................
thanks again bro...........


#5

@jkyereh: Whenever you're having problems with your code and you don't know where is the problem, try printing messages such as:

print "Test_1"


And things related, it will make it easier when it comes to big applications!

Happy coding! :sunny:


#6

I'm guessing that you just hit enter when it asked for input so that it indeed did not create word? It has to execute the code that creates the variable, the code itself is not the variable


#7

same thing is going on with me


#8

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