Computer Science, asked by nirupam30, 1 year ago

Write a program that asks the user to enter a string s1 and outputs the string s2 obtained by
reversing the order of vowels present in s1, while maintaining the other letters in their orginal
position as in s1.​

Answers

Answered by osamahere313
1

#this means a comment

#this program is in python

a=input("enter string  1")

b=["a","e","i","o","u"]#a list of vowels

c="" #empty string

for i in range(len(a),-1,-1,-1):  #the loop starts from the last element to first #element

       if a[i] in b:

              c=c+a[i]

print("the new string s2:",c)

Similar questions