## Tuesday, August 31, 2021

Solution Exercise 63: python algorithm which determines the list of words containing at least two vowels

#### Exercise 63

Write a program in python allowing to extract from a list of strings, the list of strings containing at least two vowels. Example if
``L = ["Java", "Python", "Dart", "MySql"]``
, the program returns the list
``["Java", "Python"]``
.

#### Solution

``````#coding: utf-8
def vowel (L):
# initialization of the list of words containing at least two vowels
lVowels = []
#define vowels list
vowelist = ['a', 'e', 'y', 'u', 'i', 'o']

for u in L:
# initialize the number of vowels contained in u
numberVowels = 0
for x in u:
if x in vowelist:
numberVowels = numberVowels + 1
if numberVowels >= 2:
lVowels.append (u)
return lVowels

# Example
L = ["Java", "Python", "Dart", "MySql"]
print (vowel (L)) # the output is: ['Java', 'Python']
# The output is: ['Java', 'Python']``````

Younes Derfoufi
my-courses.net

## Python Exercises With Solutions

1. Python Arithmetic Exercises
2. Equations & System Of Equations
3. Polynomials and Functions
4. Python Arithmetic Exercises
5. Numpy, Matplolib, Sympy , Scipy - Exercises
6. Python Arithmetic Exercises

Younes Derfoufi

## Sample Text 