Need help with Ending Up


Oops, try again.
It looks like new_word contains "ythonay" instead of "ythonpay"!

I dunno.....

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    print original
    print 'empty'

word = original.lower()

first = word[0]

print new_word[1:len(new_word)]


This should be in the if statement. You also never set new_word. You need to set new_word = word + first + pyg

new_word = word + first + pyg

print new_word[1:len(new_word)]

Like this?


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