/**
 * This function calculates the population density of a country using the population and area values provided.
 *
 * @param countryName The name of the country.
 * @param population The total population of the country.
 * @param area The land area of the country in square kilometers.
 * @return The population density of the country in people per square kilometer, or null if any argument is missing or invalid.
 */
fun getPopulationDensity(countryName: String?, population: Int?, area: Float?): Float? {

    // Check if any argument is missing or invalid
    if (countryName == null || population == null || population <= 0 || area == null || area <= 0) {
        return null
    }

    // Calculate and return the population density
    return population.toFloat() / area
}
/**
 * This function calculates the population density of a country using the population and area values provided.
 *
 * @param countryName The name of the country.
 * @param population The total population of the country.
 * @param area The land area of the country in square kilometers.
 * @return The population density of the country in people per square kilometer, or null if any argument is missing or invalid.
 */
fun getPopulationDensity(countryName: String?, population: Int?, area: Float?): Float? {
/**
 * This function calculates the population density of a country using the population and area values provided.
 *
 * @param countryName The name of the country.
 * @param population The total population of the country.
 * @param area The land area of the country in square kilometers.
 * @return The population density of the country in people per square kilometer, or null if any argument is missing or invalid.
 */
fun getPopulationDensity(countryName: String?, population: Int?, area: Float?): Float? {

    // Check if any argument is missing or invalid
    if (countryName == null || population == null || population <= 0 || area == null || area <= 0) {
        return null
    }

    // Calculate and return the population density
    return population.toFloat() / area
}