Computer Science, asked by riddhi1230, 8 months ago

Write a program to input a string and convert it into uppercase and print the pair of

vowels and number of pair of vowels occurring in the string.

Example:

Input:

"BEAUTIFUL BEAUTIES "

Output :

Pair of vowels: EA, AU, EA, AU, IE

No. of pair of vowels: 5​

Answers

Answered by shreyashkartrivedi
0

Answer:

answer de diya hai dekh lo

Attachments:
Answered by mad210219
0

Given:

String

To find:

A program to input a string and convert it into uppercase and print the pair of  vowels and number of pair of vowels occurring in the string.

Solution:

Program:

Count=0

S=input()

S=S.upper()  

for i in range(n):

    if ‘S[i]’ in ‘AEIOU’:

          if S[i+1]in ‘AEIOU’:

                print(S[i:i+2])

    count+=1

print(count)

here s is the input string  

in the next step we make every character uppercase

we use upper() function to make this in second step

Next ,

we compare whether there is vowel in the string and the continuity of the vowels in substring  

and we print the sub strings  

using print function and string slicing operation

expected output:

"BEAUTIFUL BEAUTIES "

Input:

"BEAUTIFUL BEAUTIES "

 

Output :

Pair of vowels: EA, AU, EA, AU, IE

No. of pair of vowels: 5

Similar questions