Problem with pyg latin translator


My code runs correctly, but I’m not getting the green light.


pyg = 'ay'

original = raw_input('Enter a word:')

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


Enter a word:Test

Error Message:

It looks like you printed the correct translation of “test”, but make sure to set new_word equal to the slice as well.

I know that the error message tells me what I’m getting wrong. But I can’t figure out how to fix that.


The instructions ask us to complete new_word in one final assignment, then to print new_word.


@mtf Thanks! That really helped me to find the solutions.


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