/**
 * This function calculates the total weight of a special recipe prepared by a chef.
 *
 * @param ingredients List of ingredients used in the recipe.
 * @param quantity List of quantities of each ingredient used in the recipe.
 * @return The total weight of the recipe.
 */
fun chefSpecialRecipe(ingredients: List<String?>, quantity: List<Int?>): Float {

    var totalWeight: Float? = null

    // Check if any ingredient is missing or its quantity is not provided
    if (null in ingredients || null in quantity) {
        return totalWeight ?: 0.0f
    }

    // Calculate the total weight
    var sum = 0.0f
    for (i in ingredients.indices) {
        if (ingredients[i] != null && quantity[i] != null) {
            sum += quantity[i]!!
        } else {
            return totalWeight ?: 0.0f
        }
    }

    return sum
}
/**
 * This function calculates the total weight of a special recipe prepared by a chef.
 *
 * @param ingredients List of ingredients used in the recipe.
 * @param quantity List of quantities of each ingredient used in the recipe.
 * @return The total weight of the recipe.
 */
fun chefSpecialRecipe(ingredients: List<String?>, quantity: List<Int?>): Float {
/**
 * This function calculates the total weight of a special recipe prepared by a chef.
 *
 * @param ingredients List of ingredients used in the recipe.
 * @param quantity List of quantities of each ingredient used in the recipe.
 * @return The total weight of the recipe.
 */
fun chefSpecialRecipe(ingredients: List<String?>, quantity: List<Int?>): Float {

    var totalWeight: Float? = null

    // Check if any ingredient is missing or its quantity is not provided
    if (null in ingredients || null in quantity) {
        return totalWeight ?: 0.0f
    }

    // Calculate the total weight
    var sum = 0.0f
    for (i in ingredients.indices) {
        if (ingredients[i] != null && quantity[i] != null) {
            sum += quantity[i]!!
        } else {
            return totalWeight ?: 0.0f
        }
    }

    return sum
}