9. Movie it on Back


#1




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


need it to exicute, seence word is defined.


pyg = 'ay'

original = raw_input("Enter a word:")
new_word = word + first + pyg

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

else: 
       print 'empty'


#2

from the instructions:

On a new line after where you created the first variable, Create a new variable called new_word

did you create new_word where the exercise told you to?

currently, you are referring to word before it is defined.

here you try to use word:

new_word = word + first + pyg

and then later in your script you define word:

word = original.lower()

you can't use variable before defining them


#3

duh ! yeah your rigth, thank you !


#4

you're welcome


#5