You're creating a simple Kotlin application that prints out the phrase "This is loop iteration" followed by the iteration number for a range of numbers. To do this, you decide to use a for loop and Kotlin's range syntax. However, you're struggling with remembering the exact syntax for creating a for loop and establishing the loop's range. Fill in the blanks in the provided code to correctly establish a for loop that iterates over a range of numbers from 0 to 10 (inclusive), and prints out the iteration phrase for each number."
For loop and ranges
For loop and iteration phrase in loop's range
Report a typo
Fill in the gaps with the relevant elements
fun main() {
(i ) {
("This is loop iteration $i")
}
} ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.