Question: 2 . 1 vowelsToWordRatio Function Name: vowelsToWordRatio Input: ( 1 times N char ) A string containing words separated by spaces Output: ( double
vowelsToWordRatio
Function Name: vowelsToWordRatio
Input:
times N char A string containing words separated by spaces
Output:
double The ratio of vowels to words in the string
Description:
Write a function called vowelsToWordRatio, which takes in a string and returns the ratio of vowels case
insensitive to words in the string.
Example:
ratio vowelsToWordRatioGo Jackets'
ratio
ratio vowelsToWordRatioEvery Good Boy Does Fine'
ratio
ratio vowelsToWordRatioI am Sam Sam I am I do not like green eggs and
ham'
ratio
Notes:
There will only be letters upper and lower case and spaces in the input string
The letters Y and y should NOT be counted as vowels
Round your ratio to two decimal places
Hint: Each word is always separated by a space
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
