Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions