Ending Up


File "python", line 12
new_word = [1:len(new_word)]
SyntaxError: invalid syntax

Cannot get this to work. I think I missed a step in a previous section, but it accepted it anyway. Help?

Replace this line with your code. 
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
    print 'empty'


You are missing a variable that should have been included in the previous exercise, perhaps go back an exercise or two and just cross reference your code with the instructions. :slight_smile:


What variable? Do you know which exercise I might have missed?


You missed this exercise,



Looking at it here, still cannot see which variable I might have missed.


Actually scratch that. I did have it copied in already, it was just I posted edited code. Editing now.


print 'Welcome to the Pig Latin Translator!'
raw_input("Enter a World:")
if len(original) >0 and x.isalpha():
print (x.isalpha)
else :

Start coding here!


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