/**
 * As a chef, you are given a list of ingredients and an oven temperature in Celsius.
 * You need to complete the function to bake cookies by following these steps:
 * 1. Check if any of the ingredients are set to null, and if so, return 'Missing ingredient!'.
 * 2. Calculate the number of cookies you can bake based on the number of chocolate chips available.
 *    If the number of chocolate chips is null, return 'Unknown amount of cookies can be baked.'.
 *    If the number of chocolate chips is not null, each cookie requires 10 chips.
 * 3. Preheat the oven to the provided temperature in Celsius.
 *    If the oven temperature is null, return 'Unknown temperature!'.
 *    Conversion: Fahrenheit = Celsius * 9/5 + 32.
 *
 * Complete the code below to solve the exercise.
 */
fun bakeCookies(ingredients: List<String?>, ovenTemp: Int?): String {

    if (ingredients.contains(null)) {
        return "Missing ingredient!"
    }

    val numberOfChips = ingredients.count { it == "chocolate chips" } * 10
    if (numberOfChips == 0) {
        return "Unknown amount of cookies can be baked."
    }

    if (ovenTemp == null) {
        return "Unknown temperature!"
    }

    return "Cookies baked successfully!"
}
/**
 * As a chef, you are given a list of ingredients and an oven temperature in Celsius.
 * You need to complete the function to bake cookies by following these steps:
 * 1. Check if any of the ingredients are set to null, and if so, return 'Missing ingredient!'.
 * 2. Calculate the number of cookies you can bake based on the number of chocolate chips available.
 *    If the number of chocolate chips is null, return 'Unknown amount of cookies can be baked.'.
 *    If the number of chocolate chips is not null, each cookie requires 10 chips.
 * 3. Preheat the oven to the provided temperature in Celsius.
 *    If the oven temperature is null, return 'Unknown temperature!'.
 *    Conversion: Fahrenheit = Celsius * 9/5 + 32.
 *
 * Complete the code below to solve the exercise.
 */
fun bakeCookies(ingredients: List<String?>, ovenTemp: Int?): String {
/**
 * As a chef, you are given a list of ingredients and an oven temperature in Celsius.
 * You need to complete the function to bake cookies by following these steps:
 * 1. Check if any of the ingredients are set to null, and if so, return 'Missing ingredient!'.
 * 2. Calculate the number of cookies you can bake based on the number of chocolate chips available.
 *    If the number of chocolate chips is null, return 'Unknown amount of cookies can be baked.'.
 *    If the number of chocolate chips is not null, each cookie requires 10 chips.
 * 3. Preheat the oven to the provided temperature in Celsius.
 *    If the oven temperature is null, return 'Unknown temperature!'.
 *    Conversion: Fahrenheit = Celsius * 9/5 + 32.
 *
 * Complete the code below to solve the exercise.
 */
fun bakeCookies(ingredients: List<String?>, ovenTemp: Int?): String {

    if (ingredients.contains(null)) {
        return "Missing ingredient!"
    }

    val numberOfChips = ingredients.count { it == "chocolate chips" } * 10
    if (numberOfChips == 0) {
        return "Unknown amount of cookies can be baked."
    }

    if (ovenTemp == null) {
        return "Unknown temperature!"
    }

    return "Cookies baked successfully!"
}