/**
 * This function calculates the population density for different geographies based on given population and area data.
 *
 * @param populationData Tuple containing population data for different geographies.
 * @param areaData Tuple containing area data for different geographies.
 * @param geographies Tuple containing the names of the geographies to calculate population density for.
 * @return Tuple containing the calculated population densities for each geography.
 */
fun getPopulationDensity(populationData: List<Int>, areaData: List<Int>, geographies: List<String>): List<Double> {

    val populationDensity = mutableListOf<Double>()

    for (geography in geographies) {
        // Find the index of the geography in the given population and area data lists
        val index = geographies.indexOf(geography)

        // Get the population of the specific geography
        val population = populationData[index].toDouble()

        // Get the area of the specific geography
        val area = areaData[index].toDouble()

        // Calculate the population density by dividing population by area
        val density = population / area

        // Add the calculated population density to the populationDensity list
        populationDensity.add(density)
    }

    return populationDensity
}
/**
 * This function calculates the population density for different geographies based on given population and area data.
 *
 * @param populationData Tuple containing population data for different geographies.
 * @param areaData Tuple containing area data for different geographies.
 * @param geographies Tuple containing the names of the geographies to calculate population density for.
 * @return Tuple containing the calculated population densities for each geography.
 */
fun getPopulationDensity(populationData: List<Int>, areaData: List<Int>, geographies: List<String>): List<Double> {
/**
 * This function calculates the population density for different geographies based on given population and area data.
 *
 * @param populationData Tuple containing population data for different geographies.
 * @param areaData Tuple containing area data for different geographies.
 * @param geographies Tuple containing the names of the geographies to calculate population density for.
 * @return Tuple containing the calculated population densities for each geography.
 */
fun getPopulationDensity(populationData: List<Int>, areaData: List<Int>, geographies: List<String>): List<Double> {

    val populationDensity = mutableListOf<Double>()

    for (geography in geographies) {
        // Find the index of the geography in the given population and area data lists
        val index = geographies.indexOf(geography)

        // Get the population of the specific geography
        val population = populationData[index].toDouble()

        // Get the area of the specific geography
        val area = areaData[index].toDouble()

        // Calculate the population density by dividing population by area
        val density = population / area

        // Add the calculated population density to the populationDensity list
        populationDensity.add(density)
    }

    return populationDensity
}