Question
Write two functions (isVowel() and getLongestVowelSequence()). The first function (isVowel()) takes a single string argument (string) that contains a single character, and returns True if
Write two functions (isVowel() and getLongestVowelSequence()). The first function (isVowel()) takes a single string argument (string) that contains a single character, and returns True if the character is a vowel ('a', 'e', 'i', 'o', or 'u'), and False otherwise. 'y' is not considered a vowel for this question. The second function (getLongestVowelSequence()) takes a single string argument (string), and returns the longest substring of string that is a made entirely of vowels. This function must call the isVowel() function in order to check if a character is a vowel, and must solve the problem recursively. Required strategy: Go through the characters of the string one at a time If the character is not a vowel, stop iteration, and use recursion to search the rest of the string Return the longest vowel sequence between the one found by the recursive call and the one we just found If the character is a vowel, then add vowel to the vowel string.
PLEASE DO THIS IN PYTHON
Step 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