Complete the code to calculate the correct result using operator precedence.
val result = 3 + 4 * [1]
The multiplication happens before addition, so 4 * 5 = 20, then 3 + 20 = 23.
Complete the code to get the correct boolean result using operator precedence.
val isTrue = true || false && [1]Logical AND (&&) has higher precedence than OR (||). So false && false = false, then true || false = true.
Fix the error in the expression by completing the code with the correct operator.
val value = 10 + 5 [1] 3
Multiplication (*) has higher precedence than addition (+), so 5 * 3 is calculated first, then added to 10.
Fill both blanks to create a map of words to their lengths only if length is greater than 3.
val lengths = mapOf([1] to [2]).filter { it.value > 3 }
The map pairs the word "apple" with the length of "apple". Then filter keeps entries with length > 3.
Fill all three blanks to create a filtered map with uppercase keys and values greater than 4.
val filtered = mapOf([1] to [2]).filter { it.value [3] 4 }
The map has key "PLUM" (uppercase) with value 5. The filter keeps entries where value > 4.