Question: Which code snippet correctly shows a for loop using a range to display "1 2 3 4 5 6"?
- `for(z in 1..7) println("$z ")`
- `for(z in 1..6) print("$z ")`
- `for(z in 1 to 6) print("$z ")`
- `for(z in 1..7) print("$z ")`
Answer: The correct answer of the above question is Option B:`for(z in 1..6) print("$z ")`