Challenge 2: Ranges and Loops — Solution fun main() { for (i in 1..20 step 2) { print("$i ") } println() val colors = listOf("red", "green", "blue") for ((index, color) in colors.withIndex()) { println("$index: $color") } } /* Output: 1 3 5 7 9 11 13 15 17 19 0: red 1: green 2: blue Notes: - 1..20 step 2 is an inclusive range from 1 to 20, advancing by 2 each time, which naturally lands on every odd number in that range. - colors.withIndex() produces a sequence of (index, value) pairs; the for-loop destructures each pair directly into "index" and "color" in the loop header. */