Answered You can hire a professional tutor to get the answer.
This is an incomplete program. The goal of the program is to count the number of times 'a', 'e', 'i', 'o', 'u' (and their upper case equivalents)...
This is an incomplete program. The goal of the program is to count the number of times 'a', 'e', 'i', 'o', 'u' (and their upper case equivalents) appear in a file.
Complete that program, by defining a count_vowels function, that satisfies the following specs:
- Function count_vowels takes one argument, called in_file, that specifies the name of the input file.
- If in_file cannot be opened for reading, the function should print on the screen "Error in opening file for reading" and return.
- Otherwise, the function counts and prints the number of times 'a', 'e', 'i', 'o', 'u' (and their upper case equivalents) appear in a file. Counting should be case-insensitive, so an 'A' should be counted as an 'a' and so on.
IMPORTANT: You are NOT allowed to modify in any way the main function.
For example, for input file: (The CAT is jumping over an airplane. TODAY IS WEDNESDAY. UUUu), the complete program should produce EXACTLY this output:
a: 6 timese: 5 timesi: 4 timeso: 2 timesu: 5 times