Move it on back


#1



https://www.codecademy.com/en/courses/python-beginner-2W5v7/1/3?curriculum_id=4f89dab3d788890003000096


I've been going through a couple exercises and my code seems to be okay when I submit it, however, I believe that there is something wrong with my code as it's not doing what it's supposed to. When I type in a word the code simpy prints out the same word in the same way. i.e. not translated to pyglatin. For some reason i've been able to get to the "Ending up" exercise and that's when I realized something's wrong with my code.

any help woud be greatly appreciated.


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 original
else:
    print 'empty'.


#2

you still print original, if you already want to print the translated (pyglatin) version, print new_word instead


#4

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