/**
 * A farmer is checking the weather condition. The temperature is given in Celsius (°C) and rainy is a boolean indicating whether it's raining or not.
 *
 * Complete the code below to perform the following tasks:
 * - If the temperature is greater than 30°C, print "It's too hot to work."
 * - If the temperature is between 20°C and 30°C, and it's not raining, print "It's a good day to work."
 * - If the temperature is below 20°C or it's raining, print "Stay at home and relax."
 *
 * Use the appropriate shift operators and break statements to complete the code.
 */
fun weatherCondition(temperature: Int, rainy: Boolean) {

    when {
        temperature > 30 -> println("It's too hot to work.")
        temperature in 20..30 && !rainy -> println("It's a good day to work.")
        else -> println("Stay at home and relax.")
    }
}
/**
 * A farmer is checking the weather condition. The temperature is given in Celsius (°C) and rainy is a boolean indicating whether it's raining or not.
 *
 * Complete the code below to perform the following tasks:
 * - If the temperature is greater than 30°C, print "It's too hot to work."
 * - If the temperature is between 20°C and 30°C, and it's not raining, print "It's a good day to work."
 * - If the temperature is below 20°C or it's raining, print "Stay at home and relax."
 *
 * Use the appropriate shift operators and break statements to complete the code.
 */
fun weatherCondition(temperature: Int, rainy: Boolean) {
/**
 * A farmer is checking the weather condition. The temperature is given in Celsius (°C) and rainy is a boolean indicating whether it's raining or not.
 *
 * Complete the code below to perform the following tasks:
 * - If the temperature is greater than 30°C, print "It's too hot to work."
 * - If the temperature is between 20°C and 30°C, and it's not raining, print "It's a good day to work."
 * - If the temperature is below 20°C or it's raining, print "Stay at home and relax."
 *
 * Use the appropriate shift operators and break statements to complete the code.
 */
fun weatherCondition(temperature: Int, rainy: Boolean) {

    when {
        temperature > 30 -> println("It's too hot to work.")
        temperature in 20..30 && !rainy -> println("It's a good day to work.")
        else -> println("Stay at home and relax.")
    }
}