10. Ending Up................ Python PygLatin


is the code supposed to be broken up in the test screen? also does this only work with words that start with o becuase of what i have chosen for first? The code is only successful with o words.

pyg = 'ay'

original = raw_input('Enter a word:')

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


Did you mean, word[0]?

Not expected or asked for. Please remove these lines.

Should probably pass, but the instructions ask us to assign the slice back onto new_word, and then print that.


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