Help with PygLatin Ending up 10/11


Oops, try again. Your code did not run to end - see the console window for the error message.

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
new_word = [1:len(new_word)]
print new_word 
print 'empty'


please help i have been stuck on this exercise forever :head_bandage: im sooo confused!


everything which should be in if or else statement should be intended:

if condition:
   # code in the if block
   # code in the else block

in your case, the indention is missing, indention is crucial in python


add + first + pyg

to this line,

so it would look like,

new_word = [1:len(new_word)] + first + pyg

it should work after that :slight_smile:

Oh yea and indent everything correctly as @stetim94 said :grin:


THANK YOU SO MUCH! THAT SEEMED TO DO THE TRICK :grinning: :grin: :kissing_smiling_eyes:


You're welcome :slight_smile:


but your indention seemed of, guess that was just a issue of copy pasting code to the forum

do you also understand why bandits solution work? you [] allows you to take a slice, but you need to add the square brackets after the variable you want to take a slice off.


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