Here is my working code plus a decoder i added at the end:
this is what is needed for the corse
pyg = 'ay'
original = raw_input('Enter a word you want to code:')
if len(original) > 0 and original.isalpha():
#sets word to lower case
word = original.lower()
#adds first letter to the end
first = word
#putts word together
#removes first letter
new_word = new_word[1:len(new_word)]
print 'The coded word is:'
print " "+new_word
#this is just adds a little white space in the output
decoder starts here
word_uncode= raw_input('Enter a word you want to decode:')
if len(word_uncode) >0 and word_uncode.isalpha():
#Check to see if code ends in 'ay'
check = word_uncode
if check ==pyg:
#removes 'ay' from the end of the word
#grabs last letter
last = uncode[-1]
#Puts the word together
uncode = last+uncode[0:-1]
print 'The decoded Word is:'
print " "+uncode
print 'Error: Your word is not in Pig Latin'
print 'Invalid Input'
Tell me what you think?