10/11, am stuck help me out


#1

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

else:
print 'empty'


#2

There is a problem with the two lines, above.

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

#3

Its still not working


#4

Please post your code again, in a new reply. Start with three back ticks and a new line, paste in your code, then a new line and three more back ticks. The key is usually just below the Esc paired with the ~.

```

Your code here

```


#5

"" pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
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

else:
print 'empty'
   
""

I also used your suggested method, it didn't work still


#6

Hi, Thank you for you reply, but this work for me..

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

#7

Those are single quotes, not back-ticks, and you need exactly 3. Look for the key with the tilde on it (usually to the left of the 1 key).


#8

Your post has been edited to include the back-ticks earlier discussed. Notice that your indentation has been preserved? Now WE see what YOU see.


#9

Thank you very much.. I appreciate your responses