Ending Up


#1



pyg = 'ay'




original = raw_input('Enter a word:')

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


#2

whats wrong with my code please help


#3

Can you explain what this line does?
This is the line where you making mistake.


#4

With this you need to add ' = new_word ' because python doesn't know what word to slice if you dont put it before the slice command.


#5

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