PygLatin 9/11. Help?


It keeps saying that new_word is not defined, :pensive: :unamused: :angry:

pyg = 'ay'

original = raw_input('Enter a word:')

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


Should it be?

Did you expect it to be?

Sounds like the part of your code that creates that variable didn't execute, if it should have, then double check the condition for running that code.

Ensure that your code is intact in your post if you wish anyone to read it.

This is always 'w' by the way: "word"[0]