# We creat a variable named pyg that has the string "ay" that is added to every word. pyg = 'ay' # We ask the user to input a word to be translated. original = raw_input('Enter a word:') # The if statement checks that the user entered a string also that this string doesn't contain numbers. if len(original) > 0 and original.isalpha(): word = original.lower() first = word new_word = word + first + pyg new_word = new_word[1:] print new_word # The elif statement checks if the word contain any number. elif not original.isalpha(): print "The word mustn't contain numbers!" else: print 'Please enter a suitable word!'
Please what exactly is the question?
I'm asking for reviews from fellow students, any suggestion about the code to make it better or cleaner ?