/**
 * Chef Dish Avg Calories:
 * This function takes a map of dishes and their respective average calories.
 * It calculates the total average calories of all the dishes and returns it.
 *
 * @param dishes A map containing dish names as keys and their average calories as values.
 * @return The total average calories of all the dishes.
 *
 * Example:
 * chefDishAvgCalories(mapOf("Pasta" to 350, "Pizza" to 400, "Salad" to 150)) returns 300.0
 */
fun chefDishAvgCalories(dishes: Map<String, Int>): Double {

    val totalAvgCalories = dishes.values.sum() / dishes.size.toDouble()

    if (dishes.isEmpty() || totalAvgCalories > 500 || !dishes.containsKey("Burger")) {
        return 0.0
    }

    return totalAvgCalories
}
/**
 * Chef Dish Avg Calories:
 * This function takes a map of dishes and their respective average calories.
 * It calculates the total average calories of all the dishes and returns it.
 *
 * @param dishes A map containing dish names as keys and their average calories as values.
 * @return The total average calories of all the dishes.
 *
 * Example:
 * chefDishAvgCalories(mapOf("Pasta" to 350, "Pizza" to 400, "Salad" to 150)) returns 300.0
 */
fun chefDishAvgCalories(dishes: Map<String, Int>): Double {
/**
 * Chef Dish Avg Calories:
 * This function takes a map of dishes and their respective average calories.
 * It calculates the total average calories of all the dishes and returns it.
 *
 * @param dishes A map containing dish names as keys and their average calories as values.
 * @return The total average calories of all the dishes.
 *
 * Example:
 * chefDishAvgCalories(mapOf("Pasta" to 350, "Pizza" to 400, "Salad" to 150)) returns 300.0
 */
fun chefDishAvgCalories(dishes: Map<String, Int>): Double {

    val totalAvgCalories = dishes.values.sum() / dishes.size.toDouble()

    if (dishes.isEmpty() || totalAvgCalories > 500 || !dishes.containsKey("Burger")) {
        return 0.0
    }

    return totalAvgCalories
}