The translator as the lesson dictates does not account for situations that would create gibberish. Namely when the input words start with a vowel or with a th, ch, wh. Take for example the word arrow. if input into the code as instructed you would get rrowaay which makes no sense. likewise a word like chocolate also has issues with the current translator returning hocolatecay. A true translator must come up with conditions to handle these exceptions. I offer the following code. arrow returns arroway and chocolate returns ocolatechay which is what you want.
pyg = 'ay' original = raw_input('Enter a word:') if len(original) > 0 and original.isalpha(): word = original.lower() first_letter = word second_letter = word # check to see if first letter is a vowel if first_letter == ('a' or 'e' or 'i' or 'o' or 'u'): new_word = word + pyg # check to see if word contains a th, ch, wh elif second_letter == 'h': first = word[0:2] new_word = word + first + pyg new_word = new_word[2:len(new_word)] # all other cases else: first = word new_word = word + first + pyg new_word = new_word[1:len(new_word)] print 'here is your translated word:' print new_word else: print 'empty'