/**
 * This exercise is about counting the number of people who meet certain criteria.
 * Given the population size and a data tuple, consisting of tuples representing people, your task is
 * to count the number of people whose age, when divided by 3, has a remainder of 0.
 *
 * @param population The total number of people in the dataset.
 * @param tupleData A tuple of tuples containing information about each person.
 *                  Each inner tuple consists of three elements: (name, age, profession).
 * @return The count of people whose age, when divided by 3, has a remainder of 0.
 */
fun countPeople(population: Int, tupleData: List<Triple<String, Int, String>>): Int {

    var count = 0

    for (person in tupleData) {
        val age = person.second
        val remainder = age % 3
        if (remainder == 0) {
            count++
        }
    }

    return count
}
/**
 * This exercise is about counting the number of people who meet certain criteria.
 * Given the population size and a data tuple, consisting of tuples representing people, your task is
 * to count the number of people whose age, when divided by 3, has a remainder of 0.
 *
 * @param population The total number of people in the dataset.
 * @param tupleData A tuple of tuples containing information about each person.
 *                  Each inner tuple consists of three elements: (name, age, profession).
 * @return The count of people whose age, when divided by 3, has a remainder of 0.
 */
fun countPeople(population: Int, tupleData: List<Triple<String, Int, String>>): Int {
/**
 * This exercise is about counting the number of people who meet certain criteria.
 * Given the population size and a data tuple, consisting of tuples representing people, your task is
 * to count the number of people whose age, when divided by 3, has a remainder of 0.
 *
 * @param population The total number of people in the dataset.
 * @param tupleData A tuple of tuples containing information about each person.
 *                  Each inner tuple consists of three elements: (name, age, profession).
 * @return The count of people whose age, when divided by 3, has a remainder of 0.
 */
fun countPeople(population: Int, tupleData: List<Triple<String, Int, String>>): Int {

    var count = 0

    for (person in tupleData) {
        val age = person.second
        val remainder = age % 3
        if (remainder == 0) {
            count++
        }
    }

    return count
}