/**
 * The goal of this exercise is to count the number of animals in a specific habitat in a zoo.
 *
 * @param zoo A list representing the animals in the zoo.
 * @param habitat A string representing the habitat to count the animals in.
 * @return The number of animals in the specified habitat.
 */
fun countAnimals(zoo: List<Pair<String, String>>, habitat: String): Int {

    // Initialize count variable
    var count = 0

    // Loop through each animal in the zoo
    for (animal in zoo) {
        // Check if the animal's habitat matches the specified habitat
        if (animal.second == habitat) {
            // Increment the count variable
            count++
        }
    }

    // Return the final count
    return count
}
/**
 * The goal of this exercise is to count the number of animals in a specific habitat in a zoo.
 *
 * @param zoo A list representing the animals in the zoo.
 * @param habitat A string representing the habitat to count the animals in.
 * @return The number of animals in the specified habitat.
 */
fun countAnimals(zoo: List<Pair<String, String>>, habitat: String): Int {
/**
 * The goal of this exercise is to count the number of animals in a specific habitat in a zoo.
 *
 * @param zoo A list representing the animals in the zoo.
 * @param habitat A string representing the habitat to count the animals in.
 * @return The number of animals in the specified habitat.
 */
fun countAnimals(zoo: List<Pair<String, String>>, habitat: String): Int {

    // Initialize count variable
    var count = 0

    // Loop through each animal in the zoo
    for (animal in zoo) {
        // Check if the animal's habitat matches the specified habitat
        if (animal.second == habitat) {
            // Increment the count variable
            count++
        }
    }

    // Return the final count
    return count
}