Challenge 2: Single-Expression Functions — Solution fun isEven(n: Int) = n % 2 == 0 fun max(a: Int, b: Int) = if (a > b) a else b fun greeting(name: String) = "Hello, $name! Welcome to Kotlin." fun main() { println(isEven(4)) println(isEven(7)) println(max(10, 3)) println(greeting("Philip")) } /* Output: true false 10 Hello, Philip! Welcome to Kotlin. Notes: - Each function is a single expression after the "=", with no braces and no "return" keyword. - max() uses "if" as an expression (it evaluates to a value), which is itself a Kotlin trait carried over from functional-style languages — Java's "if" is only a statement, never a value. - Return types (Boolean, Int, String) are all inferred from the expression on the right-hand side, so none are written explicitly. */