Math, asked by yashekar1992, 10 months ago

We would like to return the first 10 vowels appearing in a sentence. Which of the following functions will give us the output

Answers

Answered by poojan
22

Language using: Python Programming

Note:

The question is incomplete. So, we are providing the complete program functioning here that helps in retrieving the first 10 vowels from the sentence given.

Program:

sentence=input()                   #reading the sentence

ten_vowels=[]                       #list taken to insert the first 10 vowels.      

count=0            

for i in sentence:

   if i.lower() in ['a', 'e', 'i', 'o', 'u']:

       ten_vowels.append(i)    #append the letter into the list if it is an vowel

       count=count+1                #increment count by 1 on every vowel found

   if count==10:                       #If 10 vowels are done, break the loop.

       break

print(ten_vowels)

Input:

Hello There! I am Ankitha, an undergraduate student.

Output:

['e', 'o', 'e', 'e', 'I', 'a', 'A', 'i', 'a', 'a']

Learn more:

1. Ch+=2 is equivalent to​

brainly.in/question/21331324

2. A CSS file cannot be linked to a web page. State True or False.

brainly.in/question/21107345

Similar questions