Complete the code to declare an immutable variable named name with the value "Alice".
val name: String = [1]var instead of val.In Kotlin, val declares an immutable variable. The value must be assigned with quotes for a string, so "Alice" is correct.
Complete the code to declare an immutable integer variable age with the value 30.
val age: Int = [1]val again inside the assignment.Integer values are written without quotes. So 30 is the correct value to assign.
Fix the error in the code by completing the declaration of an immutable list of strings named colors.
val colors: List<String> = [1]mutableListOf() which is mutable, not immutable.To create an immutable list in Kotlin, use listOf(). arrayOf() creates an array, mutableListOf() creates a mutable list, and square brackets are not valid syntax.
Fill both blanks to declare an immutable variable pi of type Double with the value 3.14.
val [1]: [2] = 3.14
Int type which cannot hold decimals.pi.The variable name is pi and the type is Double for decimal numbers.
Fill all three blanks to declare an immutable map named user with keys "name" and "age" and their respective values.
val [1] = mapOf([2] to "Bob", [3] to 25)
The map variable is named user. The keys are strings "name" and "age" mapped to their values.