Ending Up


#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 original
else:
print 'empty'
Oops, try again. new_word should be a string!

out put is as below

Enter a word: good
good
None

Can any one help for this program to solve it


#2

Hi,

the reason the original word gets printed is that you print original instead of new_word.

Also you made a mistake here: new_word = [1/len(new_word)] You have to use a colon not /, and you need to write which string you are slicing.

It has to be new_word = new_word[1:len(new_word)] or simply new_word = new_word[1:]


#4