HELP PLS Move it on back


#1

Pls help i don't understand this exercicie.

MY CODE:
pyg = 'ay'
new_word = word + first + pyg
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
print original
else:
print 'empty'

ERRORS:Traceback (most recent call last):
File "python", line 2, in
NameError: name 'word' is not defined


#2

It means that you are trying to use a variable that is not yet defined. what is word?


#3

python doesn't know anything about word...until and unless you define it or give a value to it..thats why NameError: word is not defined is displayed.


#4

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