/**
 * Chef needs to decide whether to prepare dinner or order takeout based on certain conditions.
 * The chef can only prepare dinner if he/she has all the necessary ingredients and is not tired.
 * If the chef is tired but has help, he/she can prepare dinner.
 * If the chef is tired and doesn't have help, he/she should order takeout.
 * If the chef has all the ingredients and is not tired, he/she can prepare dinner.
 * If any of the conditions are not met, the chef should order takeout.
 *
 * @param chefName The name of the chef.
 * @param hasIngredients Indicates whether the chef has all the necessary ingredients.
 * @param isTired Indicates whether the chef is tired.
 * @param hasHelp Indicates whether the chef has help for dinner preparation.
 * @return A message indicating whether the chef should prepare dinner or order takeout.
 */
fun prepareDinner(chefName: String, hasIngredients: Boolean, isTired: Boolean, hasHelp: Boolean): String {

    return when {
        hasIngredients && !isTired -> "$chefName should prepare dinner."
        isTired && hasHelp -> "$chefName should prepare dinner."
        isTired && !hasHelp -> "$chefName should order takeout."
        hasIngredients && !isTired -> "$chefName should prepare dinner."
        else -> "$chefName should order takeout."
    }
}
/**
 * Chef needs to decide whether to prepare dinner or order takeout based on certain conditions.
 * The chef can only prepare dinner if he/she has all the necessary ingredients and is not tired.
 * If the chef is tired but has help, he/she can prepare dinner.
 * If the chef is tired and doesn't have help, he/she should order takeout.
 * If the chef has all the ingredients and is not tired, he/she can prepare dinner.
 * If any of the conditions are not met, the chef should order takeout.
 *
 * @param chefName The name of the chef.
 * @param hasIngredients Indicates whether the chef has all the necessary ingredients.
 * @param isTired Indicates whether the chef is tired.
 * @param hasHelp Indicates whether the chef has help for dinner preparation.
 * @return A message indicating whether the chef should prepare dinner or order takeout.
 */
fun prepareDinner(chefName: String, hasIngredients: Boolean, isTired: Boolean, hasHelp: Boolean): String {
/**
 * Chef needs to decide whether to prepare dinner or order takeout based on certain conditions.
 * The chef can only prepare dinner if he/she has all the necessary ingredients and is not tired.
 * If the chef is tired but has help, he/she can prepare dinner.
 * If the chef is tired and doesn't have help, he/she should order takeout.
 * If the chef has all the ingredients and is not tired, he/she can prepare dinner.
 * If any of the conditions are not met, the chef should order takeout.
 *
 * @param chefName The name of the chef.
 * @param hasIngredients Indicates whether the chef has all the necessary ingredients.
 * @param isTired Indicates whether the chef is tired.
 * @param hasHelp Indicates whether the chef has help for dinner preparation.
 * @return A message indicating whether the chef should prepare dinner or order takeout.
 */
fun prepareDinner(chefName: String, hasIngredients: Boolean, isTired: Boolean, hasHelp: Boolean): String {

    return when {
        hasIngredients && !isTired -> "$chefName should prepare dinner."
        isTired && hasHelp -> "$chefName should prepare dinner."
        isTired && !hasHelp -> "$chefName should order takeout."
        hasIngredients && !isTired -> "$chefName should prepare dinner."
        else -> "$chefName should order takeout."
    }
}