Stuck On 10/11?


#1

This should work for you:
pyg = 'ay'

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


#2

The problem comes from your code on line 9: print original. Because this is the end of the program, we want to print the result. It should read print new_word


#3

Incorrect. This code is fully working, it has no problems, and I don't think it was a question anyway.



@hartless Please don't post things like this on the forums, I understand that you are trying to help but it will be better for people to learn what their mistakes are and fix it than to just copy your code. What I mean is if people are really stuck, they will make the effort to post their code and get a response telling them what's wrong, and this helps them see their errors better.

#4

Actually there are a few minor errors, involving what it prints out, like @cjacobmtz said:
Correct code should be
`
pyg = 'ay'

original = raw_input('Enter a word:')

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