Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function numVowels () that takes a string representing a file name as a parameter and returns the number of vowels (both upper- and
- Write a function numVowels() that takes a string representing a file name as a parameter and returns the number of vowels (both upper- and lowercase) that appear in the file. For the purposes of this question a vowel is one of a, e, i, o, or u. The following shows how the function would behave for several sample files that are included in the zip file with the assignment template: The purpose of this program is to print the number of vowels in the text files(not included).
Output should look like this:
>>VOwelCount (example.txt') 19 >>> vowe!count ( ' Robot. txt ' ) 330 >>>VOwelCount (hamlet.txt) 328 Ln: 11 Col: 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started