/**
 * This exercise requires the completion of a function that takes a sentence as input and counts the number of vowels
 * and consonants in it. The function should return a Pair containing the count of vowels and consonants.
 *
 * @param sentence The sentence to count vowels and consonants in.
 * @return A Pair containing the count of vowels and consonants in the sentence.
 *
 * Example:
 * countVowelsConsonants("Hello, how are you?")
 * Output: Pair(7, 10)
 */
fun countVowelsConsonants(sentence: String): Pair<Int, Int> {

    val vowels = setOf('a', 'e', 'i', 'o', 'u')
    var vowelCount = 0
    var consonantCount = 0

    for (char in sentence) {
        if (char.isLetter()) {
            if (char.toLowerCase() in vowels) {
                vowelCount++
            } else {
                consonantCount++
            }
        }
    }

    return Pair(vowelCount, consonantCount)
}
/**
 * This exercise requires the completion of a function that takes a sentence as input and counts the number of vowels
 * and consonants in it. The function should return a Pair containing the count of vowels and consonants.
 *
 * @param sentence The sentence to count vowels and consonants in.
 * @return A Pair containing the count of vowels and consonants in the sentence.
 *
 * Example:
 * countVowelsConsonants("Hello, how are you?")
 * Output: Pair(7, 10)
 */
fun countVowelsConsonants(sentence: String): Pair<Int, Int> {
/**
 * This exercise requires the completion of a function that takes a sentence as input and counts the number of vowels
 * and consonants in it. The function should return a Pair containing the count of vowels and consonants.
 *
 * @param sentence The sentence to count vowels and consonants in.
 * @return A Pair containing the count of vowels and consonants in the sentence.
 *
 * Example:
 * countVowelsConsonants("Hello, how are you?")
 * Output: Pair(7, 10)
 */
fun countVowelsConsonants(sentence: String): Pair<Int, Int> {

    val vowels = setOf('a', 'e', 'i', 'o', 'u')
    var vowelCount = 0
    var consonantCount = 0

    for (char in sentence) {
        if (char.isLetter()) {
            if (char.toLowerCase() in vowels) {
                vowelCount++
            } else {
                consonantCount++
            }
        }
    }

    return Pair(vowelCount, consonantCount)
}