Question
In the space below, create a recursive Python function('removeVowels(s)`) that takes in a string s as its parameter and returns a string with all vowels
In the space below, create a recursive Python function('removeVowels(s)`) that takes in a string s as its parameter and returns a string with all vowels ('a','e','i','o','u','A','E','I','O','U') removed from s.
Your solution should be a complete function definition with appropriate syntax and indentation.
Note:
1. your solution must be recursive (and follow the three laws of recursion).
2. you may not use the string's .find or .replace methods (hint: think about using string concatenation in your solution).
3. your solution cannot use any helper functions.
4. your function definition must be syntactically correct in order to receive full credit.
If your recursive function is implemented correctly, then the following assert statements should pass:
assert removeVowels("CS9") == "CS9" assert removeVowels("Aaaah!") == "h!" assert removeVowels("") == "" assert removeVowels("aAeEiIoOuU") == ""
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