Plsease help me! please


(popup message)Oops, try again. It looks like new_word contains "wordway" instead of "ordway"!
(console) Enter a word: word

It should have worked! i expected to move the first letter to the end of the word and then add 'ay' at the end!
if someone can give me line-by-line or just tell me where to change my cade, please do!

pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = word + first + pyg

if len(original) > 0 and original.isalpha():
    print original
    print 'empty'
    new_word = new_word[1:len(new_word)]


new_word needs to be defined like this:

new_word = word[1:]+first+pyg

This grabs everything from past the first letter, and combines it with the w BEFORE, rather than both BEFORE and AFTER.


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