Q. Write a program which replaces all vowels in the string with ‘*’.
Answer =
string = input("Enter a string :-") newstring = "" for i in string : if i == "a"or i == "e"or i == "i"or i == "o"or i == "u"or i == "A"or i == "E"or i == "I"or i == "O"or i == "U": newstring += "*" else : newstring += i print(newstring)
how to run this
ReplyDeleteCopy the script and paste it your idle python software.
Delete
ReplyDeletethx u so much it helps me a lot to prepare for my exam.
tnx
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )