This assignment is to provide you with practice using loops. Thus loops should be used wherever appropriate. Other methods of solving the problems will not receive full marks even though they may work. The use of the “break” keyword is not permitted in this assignment. Also, using loops such as “while True:” is bad practice. Reduced marks will be given for solutions that use such constructs.
Question 4: Find Vowels
Write a function that takes as input a string and returns a list of the index positions of all the vowels in the word. A vowel is defined as any letter in “aeiouAEIOU”. Use this function in a program that prompts the user for a word or phrase and outputs the index positions of all the vowels. Make your program user friendly. You must NOT print the index positions as a list. Instead, the index positions should be printed one per line as shown below. For example, your program may execute as follows: Please enter a word (or phrase) and I will tell you where the vowels are: Hello WORLD!! The vowels are at positions: 1 4 7