Answered step by step
Verified Expert Solution
Link Copied!

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

  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:

image text in transcribed

>>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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

Reguired, Reguired

Answered: 1 week ago