Challenge 1: val vs var in Practice — Solution fun main() { val myName = "Philip" var counter = 0 counter = counter + 1 println("$myName's counter: $counter") counter += 1 println("$myName's counter: $counter") counter += 1 println("$myName's counter: $counter") // myName = "Someone else" // Compile error: Val cannot be reassigned } /* Output: Philip's counter: 1 Philip's counter: 2 Philip's counter: 3 Notes: - counter is a var, so it can be reassigned three times. - myName is a val — uncommenting the reassignment line produces a compiler error ("Val cannot be reassigned"), not a runtime error. Kotlin catches this at compile time, before the program ever runs. */