/**
 * This exercise requires you to create a tuple and loop through its elements.
 *
 * You need to write a Kotlin function that returns a list of the first 10 even numbers.
 * The function should then iterate through each element in the list and print it.
 *
 * Your task is to complete the function code to solve the exercise.
 */
fun createTupleAndLoop() {

    // Define an empty list to store even numbers
    val evenNums = mutableListOf<Int>()

    // Create a loop to generate the first 10 even numbers
    for (num in 1..20) {
        // Check if the number is even
        if (num % 2 == 0) {
            // Add even number to the list
            evenNums.add(num)
        }
    }

    // Convert the list into a tuple (Kotlin doesn't have tuples, so we use a list)
    val evenList = evenNums.toList()

    // Iterate through each element in the list and print it
    for (element in evenList) {
        // Print the element
        println(element)
    }
}
/**
 * This exercise requires you to create a tuple and loop through its elements.
 *
 * You need to write a Kotlin function that returns a list of the first 10 even numbers.
 * The function should then iterate through each element in the list and print it.
 *
 * Your task is to complete the function code to solve the exercise.
 */
fun createTupleAndLoop() {
/**
 * This exercise requires you to create a tuple and loop through its elements.
 *
 * You need to write a Kotlin function that returns a list of the first 10 even numbers.
 * The function should then iterate through each element in the list and print it.
 *
 * Your task is to complete the function code to solve the exercise.
 */
fun createTupleAndLoop() {

    // Define an empty list to store even numbers
    val evenNums = mutableListOf<Int>()

    // Create a loop to generate the first 10 even numbers
    for (num in 1..20) {
        // Check if the number is even
        if (num % 2 == 0) {
            // Add even number to the list
            evenNums.add(num)
        }
    }

    // Convert the list into a tuple (Kotlin doesn't have tuples, so we use a list)
    val evenList = evenNums.toList()

    // Iterate through each element in the list and print it
    for (element in evenList) {
        // Print the element
        println(element)
    }
}