Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Replace all vowels in a string with the character '*'

Medium

Problem Statement

Replace all vowels in a string with the character '*'

Sample Input

hello world

Sample Output

h*ll* w*rld

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
def replace_vowels(): s = "hello world" # Your code here return
Log in or sign up to run or submit your code.Log inSign up
Input
hello world
Expected Output
h*ll* w*rld