Challenge 1: Extension Function on Int — Solution fun Int.isPrime(): Boolean { if (this < 2) return false for (i in 2 until this) { if (this % i == 0) return false } return true } fun main() { println(2.isPrime()) println(7.isPrime()) println(9.isPrime()) println(1.isPrime()) } /* Output: true true false false Notes: - fun Int.isPrime() adds isPrime() to every Int in the codebase, called exactly like a real member function: 7.isPrime(). - Inside the function, "this" refers to the specific Int the function was called on (7, in 7.isPrime()). - Numbers less than 2 return false immediately; otherwise the loop checks for any divisor between 2 and (this - 1) — finding one means it isn't prime. */