Challenge 1: when as an Expression — Solution fun seasonFor(month: Int): String = when (month) { 12, 1, 2 -> "Winter" 3, 4, 5 -> "Spring" 6, 7, 8 -> "Summer" 9, 10, 11 -> "Autumn" else -> "Invalid month" } fun main() { println(seasonFor(1)) println(seasonFor(7)) println(seasonFor(10)) println(seasonFor(13)) } /* Output: Winter Summer Autumn Invalid month Notes: - seasonFor is a single-expression function; its entire body is the when expression, so its result is returned directly with no "return" keyword. - Each branch groups multiple month numbers with a comma (12, 1, 2 -> ...) rather than needing three separate branches with identical results. - else covers any value outside 1-12, keeping the when exhaustive for all possible Int inputs. */