← Back to challenges

Apples and Bananas

PythonHardstringslanguage_fundamentals

Instructions

Write a function that replaces all vowels in a string with a specified vowel.

Examples

vow_replace("apples and bananas", "u") ➞ "upplus und bununus"

vow_replace("cheese casserole", "o") ➞ "chooso cossorolo"

vow_replace("stuffed jalapeno poppers", "e") ➞ "steffed jelepene peppers"

Notes

  • All words will be lowercase.
  • "Y" is not considered a vowel.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Doubled Pay