Computer Science, asked by durgaganeshuddandi, 3 months ago

Write a program with a user defined program with string as a parameter which replaces all

vowels in the string with '*'.​

Answers

Answered by MissElegantHere
4

Question:- Write a program with a user defined program with string as a parameter which replaces all vowels in the string with '*'.

Answer:- #Function to replace all vowels in the string with '*' def replaceVowel(st): #Create an empty string newstr = '' for character in st: #Check if next character is a vowel if character in 'aeiouAEIOU': #Replace vowel with * newstr += '*' else: newstr += character return newstr #End of function st = input("Enter a String:

Similar questions