Doesn't Work. Please Help!

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
  final_word = new_word[1:len(new_word)]
print final_word

    print 'empty'

This is my code but it doesn’t work. please help in order to solve this.


why is print final_word not inside the if clause? You only want to print final_word if user input is valid.

also, final_word might need to be renamed to new_word for the exercise


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