I have no idea why it dsnt work!


#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'

This is my total code and it dsnt work!:(( i started it again and again in different combinations, but it still uncorrect! (i checked it on python.org and it gave me right result)
Error:
Oops, try again. It looks like new_word contains "croccay" instead of "roccay"!
(word to enter: croc)
:sob:


#2

add first and pyg to this slice as well,

to,

new_word[1:len(new_word)] #add first and pyg variables here


#3

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