/**
 * This exercise is about creating a masterpiece painting with nested if-else statements.
 * Complete the code to paint a picture on a canvas based on the given parameters.
 *
 * @param style The desired style of the painting. Options are 'realistic', 'impressionistic', or 'abstract'.
 * @param canvasSize The size of the canvas. Options are 'small', 'medium', or 'large'.
 * @param colors The number of colors available for the painting. Options are between 1 and 5.
 * @return A message indicating the style, canvas size, and number of colors used for the painting.
 */
fun paintPicture(style: String, canvasSize: String, colors: Int): String {

    return when {
        style == "realistic" -> {
            when {
                canvasSize == "small" -> {
                    if (colors >= 1) {
                        "Realistic painting created on a small canvas using $colors colors."
                    } else {
                        "A realistic painting requires at least one color."
                    }
                }
                canvasSize == "medium" -> {
                    if (colors >= 2) {
                        "Realistic painting created on a medium canvas using $colors colors."
                    } else {
                        // Handle the case when colors are less than 2 for medium canvas
                        "A realistic painting on a medium canvas requires at least two colors."
                    }
                }
                else -> "Canvas size not supported."
            }
        }
        else -> "Style not supported."
    }
}
/**
 * This exercise is about creating a masterpiece painting with nested if-else statements.
 * Complete the code to paint a picture on a canvas based on the given parameters.
 *
 * @param style The desired style of the painting. Options are 'realistic', 'impressionistic', or 'abstract'.
 * @param canvasSize The size of the canvas. Options are 'small', 'medium', or 'large'.
 * @param colors The number of colors available for the painting. Options are between 1 and 5.
 * @return A message indicating the style, canvas size, and number of colors used for the painting.
 */
fun paintPicture(style: String, canvasSize: String, colors: Int): String {
/**
 * This exercise is about creating a masterpiece painting with nested if-else statements.
 * Complete the code to paint a picture on a canvas based on the given parameters.
 *
 * @param style The desired style of the painting. Options are 'realistic', 'impressionistic', or 'abstract'.
 * @param canvasSize The size of the canvas. Options are 'small', 'medium', or 'large'.
 * @param colors The number of colors available for the painting. Options are between 1 and 5.
 * @return A message indicating the style, canvas size, and number of colors used for the painting.
 */
fun paintPicture(style: String, canvasSize: String, colors: Int): String {

    return when {
        style == "realistic" -> {
            when {
                canvasSize == "small" -> {
                    if (colors >= 1) {
                        "Realistic painting created on a small canvas using $colors colors."
                    } else {
                        "A realistic painting requires at least one color."
                    }
                }
                canvasSize == "medium" -> {
                    if (colors >= 2) {
                        "Realistic painting created on a medium canvas using $colors colors."
                    } else {
                        // Handle the case when colors are less than 2 for medium canvas
                        "A realistic painting on a medium canvas requires at least two colors."
                    }
                }
                else -> "Canvas size not supported."
            }
        }
        else -> "Style not supported."
    }
}