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)


4 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Replies
    1. Copy the script and paste it your idle python software.

      Delete

  2. thx u so much it helps me a lot to prepare for my exam.


    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post