PygLatin translator not functional


#1



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


Codecademy tells me that my code is fine and I can move on to the next lesson, but when I try to use what I've done with the translator so far, it does not work. Also it says that there is a syntax error on line 10 that I can't seem to fix.


I expected it to at least display the word I inputted in lowercase form, but it returns my input exactly the same way.


pyg = 'ay'

original = raw_input('Enter a word:')

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


#2

Well.. if you look at your code,

As for the syntax error, when you slice something you have to say what something is "I want the second value through the tenth" .. yeah but from what?


#4

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