/**
 * This function takes the type of dish and the number of guests as inputs, and prepares the dish accordingly.
 * The dish types can be 'appetizer', 'main course', or 'dessert'.
 * The number of guests should be an integer.
 */
fun prepareDish(dishType: String, noOfGuests: Int) {

    when (dishType) {
        "appetizer" -> {
            when {
                noOfGuests < 5 -> println("Preparing bite-sized appetizer.")
                noOfGuests in 5 until 10 -> println("Preparing small platter of appetizer.")
                else -> println("Preparing large platter of appetizer.")
            }
        }
        "main course" -> {
            when {
                noOfGuests < 5 -> println("Preparing individual main course.")
                noOfGuests in 5 until 10 -> println("Preparing family style main course.")
                noOfGuests in 10 until 20 -> println("Preparing buffet style main course.")
                else -> println("Preparing catered main course.")
            }
        }
        "dessert" -> {
            if (noOfGuests < 5) {
                // Add dessert preparation logic for less than 5 guests
            }
        }
        else -> println("Invalid dish type.")
    }
}
/**
 * This function takes the type of dish and the number of guests as inputs, and prepares the dish accordingly.
 * The dish types can be 'appetizer', 'main course', or 'dessert'.
 * The number of guests should be an integer.
 */
fun prepareDish(dishType: String, noOfGuests: Int) {
/**
 * This function takes the type of dish and the number of guests as inputs, and prepares the dish accordingly.
 * The dish types can be 'appetizer', 'main course', or 'dessert'.
 * The number of guests should be an integer.
 */
fun prepareDish(dishType: String, noOfGuests: Int) {

    when (dishType) {
        "appetizer" -> {
            when {
                noOfGuests < 5 -> println("Preparing bite-sized appetizer.")
                noOfGuests in 5 until 10 -> println("Preparing small platter of appetizer.")
                else -> println("Preparing large platter of appetizer.")
            }
        }
        "main course" -> {
            when {
                noOfGuests < 5 -> println("Preparing individual main course.")
                noOfGuests in 5 until 10 -> println("Preparing family style main course.")
                noOfGuests in 10 until 20 -> println("Preparing buffet style main course.")
                else -> println("Preparing catered main course.")
            }
        }
        "dessert" -> {
            if (noOfGuests < 5) {
                // Add dessert preparation logic for less than 5 guests
            }
        }
        else -> println("Invalid dish type.")
    }
}