# Purpose: input manipulation. report the number of vowels per word for # for a user-specified list of words. also report the total number # of vowels seen overall VOWELS = "aeiou" # get user-supplied words reply = input( 'Enter the name of a doll: ' ) print() # convert reply into a list of lowercase words words = reply.lower() words = words.split() print( words ) # keep track of the number of vowels seen across all words (so far) nbr_vowels_seen = 0 # examine the words one by one and report on its vowel usage for word in words : # word is the iterator # each iteration need to determine the current word's vowel usage and # then report it nbr_of_vowels_current_word = 0 for vowel in VOWELS: # this loop looks at the current word and counts the # of a's, then e's... for all the vowels n = word.count( vowel ) nbr_of_vowels_current_word = nbr_of_vowels_current_word + n # determine vowel usage print( nbr_of_vowels_current_word ) # report on the word nbr_vowels_seen = nbr_vowels_seen + nbr_of_vowels_current_word # report the total number of vowels seen across all words print() print( " The number of vowels in the doll name: ", nbr_vowels_seen)