/**
 * This exercise is about counting the number of vowels in a list of words.
 * The function countVowels takes a list of words as input and returns the total number of vowels in all the words combined.
 *
 * @param words a list of strings representing the words to count the vowels from.
 * @return The total number of vowels in all the words combined.
 *
 * Example:
 * -> countVowels(listOf("electrician", "engineering", "conduit"))
 * Output: 8
 */
fun countVowels(words: List<String>): Int {

    var totalVowels = 0

    for (word in words) {
        for (letter in word) {
            if (letter.toLowerCase() in listOf('a', 'e', 'i', 'o', 'u')) {
                totalVowels++
            }
        }
    }

    return totalVowels
}
/**
 * This exercise is about counting the number of vowels in a list of words.
 * The function countVowels takes a list of words as input and returns the total number of vowels in all the words combined.
 *
 * @param words a list of strings representing the words to count the vowels from.
 * @return The total number of vowels in all the words combined.
 *
 * Example:
 * -> countVowels(listOf("electrician", "engineering", "conduit"))
 * Output: 8
 */
fun countVowels(words: List<String>): Int {
/**
 * This exercise is about counting the number of vowels in a list of words.
 * The function countVowels takes a list of words as input and returns the total number of vowels in all the words combined.
 *
 * @param words a list of strings representing the words to count the vowels from.
 * @return The total number of vowels in all the words combined.
 *
 * Example:
 * -> countVowels(listOf("electrician", "engineering", "conduit"))
 * Output: 8
 */
fun countVowels(words: List<String>): Int {

    var totalVowels = 0

    for (word in words) {
        for (letter in word) {
            if (letter.toLowerCase() in listOf('a', 'e', 'i', 'o', 'u')) {
                totalVowels++
            }
        }
    }

    return totalVowels
}