Any help with my code? 10. Ending Up


#1

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


#2

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


#3

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


#4

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


#5

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