Question: The function definition below is taken from Chapter 4 and describes the general problem of finding the first occurrence of a given character in a
The function definition below is taken from Chapter 4 and describes the general problem of finding the first occurrence of a given character in a given string:
Function: first index \ Inputs: text, a string; character, a string \ Preconditions: |character| = 1 \ Output: index, an integer \ Postconditions: if character occurs in text, index is the smallest integer such that text[index] = character, otherwise index = |text|
Write a function defintion that finds the second occurrence of any vowel in a given string. If a second vowel is not found, the function should indicate this by returning the length of the string. The vowels do not need to be the same letter or the same case (i.e. uppercase or lowercase)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
