NPTEL | Joy of computing using Python | WEEK 8 | Programming Assignment 3: Vowels

preview_player
Показать описание
NPTEL | Joy of computing using Python | WEEK 8 | Programming Assignment 3: Vowels
÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷

def vow(l):

return ((l == 'a') or (l == 'e') or (l == 'i') or (l == 'o') or (l == 'u'))
def final(ip):
print(ip[0], end = "");
for i in range(1,len(ip)):
if ((vow(ip[i - 1]) != True) or
(vow(ip[i])!= True)):
print(ip[i], end = "")
ip=input()
final(ip)

÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷
Given a string S of lowercase letters, remove consecutive vowels from S. After removing, the order of the list should be maintained.

Input Format:

Sentence S in a single line

Output Format:
Print S after removing consecutive vowels

Example:

Input:
your article is in queue

Output:
yor article is in qu

Explanation:

In the first word, 'o' and 'u' are appearing together, hence the second letter 'u' is removed. In the fifth word, 'u', 'e', 'u' and 'e' are appearing together, hence 'e', 'u', 'e' are removed.
Рекомендации по теме
Комментарии
Автор

NPTEL AUG-NOV 2019
THE JOY OF COMPUTING USING PYTHON
WEEK 8 SOLUTIONS HAVE BEEN UPLOADED.

UltimateGamer-easycodesol
Автор

week 8 programming assignment text file

UltimateGamer-easycodesol
Автор

You're a legend. Thank you for your efforts

-ankurghosh
Автор

hey i will provide you questions on email for todays python exam if you want you can u upload solution video for it??
thanks.

ShettyGaneshprasad
Автор

post the code for second time as it isn't shown to us....

mr_ghosh
Автор

Pl some one copy and paste the code please

shireeshakb
welcome to shbcf.ru