/**
 * Write a function that takes a string as input and returns two values: the number of vowels in the string and the number of consonants in the string.
 *
 * To solve this exercise, you can use conditional statements and loops to iterate over the string character by character. Initialize two counters, one for vowels and one for consonants, both set to 0. Then, for each character in the string, check if it is a vowel or a consonant. If it is a vowel, increment the vowel counter. If it is a consonant, increment the consonant counter. Finally, return the two counters as a Pair.
 *
 * Example:
 * Input:
 *     countVowelsConsonants("Environmental Scientist")
 * Output:
 *     Pair(9, 14)
 */
fun countVowelsConsonants(string: String): Pair<Int, Int> {

    val string = string.toLowerCase()
    var vowels = 0
    var consonants = 0
    for (char in string) {
        if (char.isLetter()) {
            if (char in listOf('a', 'e', 'i', 'o', 'u')) {
                vowels++
            } else {
                consonants++
            }
        }
    }
    return Pair(vowels, consonants)
}
/**
 * Write a function that takes a string as input and returns two values: the number of vowels in the string and the number of consonants in the string.
 *
 * To solve this exercise, you can use conditional statements and loops to iterate over the string character by character. Initialize two counters, one for vowels and one for consonants, both set to 0. Then, for each character in the string, check if it is a vowel or a consonant. If it is a vowel, increment the vowel counter. If it is a consonant, increment the consonant counter. Finally, return the two counters as a Pair.
 *
 * Example:
 * Input:
 *     countVowelsConsonants("Environmental Scientist")
 * Output:
 *     Pair(9, 14)
 */
fun countVowelsConsonants(string: String): Pair<Int, Int> {
/**
 * Write a function that takes a string as input and returns two values: the number of vowels in the string and the number of consonants in the string.
 *
 * To solve this exercise, you can use conditional statements and loops to iterate over the string character by character. Initialize two counters, one for vowels and one for consonants, both set to 0. Then, for each character in the string, check if it is a vowel or a consonant. If it is a vowel, increment the vowel counter. If it is a consonant, increment the consonant counter. Finally, return the two counters as a Pair.
 *
 * Example:
 * Input:
 *     countVowelsConsonants("Environmental Scientist")
 * Output:
 *     Pair(9, 14)
 */
fun countVowelsConsonants(string: String): Pair<Int, Int> {

    val string = string.toLowerCase()
    var vowels = 0
    var consonants = 0
    for (char in string) {
        if (char.isLetter()) {
            if (char in listOf('a', 'e', 'i', 'o', 'u')) {
                vowels++
            } else {
                consonants++
            }
        }
    }
    return Pair(vowels, consonants)
}