Problem in the exercises


I'm having trouble in one of the exercises. An error message says ". Oops, try again It seems that new_word and equal to" facafay "instead of" acafay "!". But the console shows:
"Enter a word: faca
none "

My code is:
pyg = 'ay'

original = raw_input('Entre com uma palavra:')

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



If the variable contains one thing and you printed another, then you printed something other than that variable, right.


I don't getted. For me, i'm doing what the exercises want, but he is saying that i'm not!
But the console shows the right thing!
Could you point in what line is the error?



Your variable new_word equals to word + first + pyg. Variable, without further manipulation, must give correct output. In layman's terms:

print new_word

without slicing ([1:]) must give the correct output. It's variable that matters, not print output.


Got it!!!
Thank you :slightly_smiling: