Any help with my code? 10. Ending Up


What is wrong with my following code? I keep getting the wrong word.

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
print 'empty'


Do you get an error message?

you still print original, if you already want to print the partial translated pyglatin, you need to print new_word


Hi! I now get
Oops, try again. It looks like new_word contains "pythonpay" instead of "ythonpay"!


that explains why you get an error message, you haven't done the steps of this exercise yet

you need to take the first letter out using string slicing, see information and instructions of the exercise


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