Question: Write a function numVowels () that takes a string representing a file name as a parameter and returns the number of vowels (both upper- and

  1. 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:

 Write a function numVowels() that takes a string representing a file

>>VOwelCount (example.txt') 19 >>> vowe!count ( ' Robot. txt ' ) 330 >>>VOwelCount (hamlet.txt) 328 Ln: 11 Col: 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!