Complete the code to declare an integer variable named age with value 30.
val age: Int = [1]The Int type holds whole numbers without decimals. So 30 is correct.
Complete the code to declare a Long variable named distance with value 10000000000.
val distance: Long = [1]L suffix causes errors or wrong type.f or decimals.The Long type holds large whole numbers. Adding L suffix tells Kotlin it's a Long.
Fix the error in the code by choosing the correct value for a Float variable temperature.
val temperature: Float = [1]f suffix causes type mismatch.Float values require the f suffix in Kotlin to distinguish from Double.
Fill both blanks to create a Double variable price with value 19.99 and print it.
val price: [1] = 19.99 println([2])
Float instead of Double for decimal literals without suffix.price is declared as Double type and printed by its name price.
Fill all three blanks to create a map of numbers with their types as strings, filtering only those with value greater than 10.
val numbers = mapOf( [1] to "Int", [2] to "Long", [3] to "Float" ).filter { it.key > 10 }
We use 15 as Int, 20L as Long, and 12.5f as Float. The filter keeps only keys greater than 10.