# countvowels.py # This program iterates through a string and counts the number of # vowels it contains. # Extract a string from the user. text = raw_input( "Enter a string to be evaluated: " ) # Iterate through the string. numVowels = 0 for ch in text : if ch in "aeiou" : numVowels = numVowels + 1 # Print the results. print "There are " + str( numVowels ) + " vowels in the string."