Vowel Counter 1

Write a program vowel_counter1.py that prints out how many vowels there are in a word entered by the user.

The program should include a function count_vowels(word) that takes the parameter word and goes through it letter by letter, looking for vowels (a, e, i, o, or u, but not y). That function returns the vowel count to the main program which prints it out.

Note that there will be words in which 'y' acts as a vowel. The word "mystery," for example, has three vowels: y, e, and y. This simple function will not be able to identify those cases, but you might give some thought to what it is about that word that would help you to identify that 'y' is acting as a vowel there.

Extension 1

Have the count_vowels() function also count the number of y letters in a word. If there are no regular vowels in the word (say for a word like "myth"), the function should return the number of y's found.

Extension 2

Have the count_vowels() function operate correctly, counting y letters in a word, but only if they are acting as vowel sounds in that word. Question: How do we know if a y is acting as a vowel sound? That's part of the challenge to this Extension!