Complete the code to check if a is equal to b.
val result = (a [1] b)
println(result)In Kotlin, == checks if two values are equal.
Complete the code to check if x is greater than y.
if (x [1] y) { println("x is greater") }
The > operator checks if the left value is greater than the right value.
Fix the error in the code to check if num is not equal to 10.
val check = (num [1] 10) println(check)
The != operator checks if two values are not equal in Kotlin.
Fill both blanks to create a map of words to their lengths, but only for words longer than 3 characters.
val lengths = words.filter { word -> word.length > 3 }.associate { word -> [1] to [2] }word.size or word.count() which are not properties of String in Kotlin.The key should be the word itself, and the value should be its length using word.length.
Fill all three blanks to filter a map to only include entries where the value is greater than 5.
val filtered = map.filter { ([1], [2]) -> [2] [3] 5 }In the lambda, key and value represent the map entry. We check if value > 5.
