/**
 * This exercise aims to challenge the physical therapist to iterate over a specific range and loop through lists simultaneously.
 *
 * The exercise requires the therapist to loop through the given range and access the elements at those indices in both list1 and list2.
 *
 * The therapist needs to modify the code and complete the task by comparing values from both lists and perform certain actions based on the conditions given.
 */
fun loopThroughLists(rangeStart: Int, rangeEnd: Int, list1: List<Int>, list2: List<Int>) {

    // Iterate over the specified range
    for (i in rangeStart..rangeEnd) {
        // Accessing elements from list1 and list2 based on the index
        val element1 = list1[i]
        val element2 = list2[i]

        // Modify code below to solve the exercise
        // ---------------------------------------------------------------------
        //
        // Instructions:
        // 1. Compare element1 and element2.
        // 2. Perform different actions based on the following criteria:
        //       - If element1 is greater than element2, print "Element 1 is greater at index: i".
        //       - If element1 is less than element2, perform a different action.
        // ---------------------------------------------------------------------

        if (element1 > element2) {
            println("Element 1 is greater at index: $i")
        } else {
            // Perform a different action if element1 is less than element2
        }
    }
}
/**
 * This exercise aims to challenge the physical therapist to iterate over a specific range and loop through lists simultaneously.
 *
 * The exercise requires the therapist to loop through the given range and access the elements at those indices in both list1 and list2.
 *
 * The therapist needs to modify the code and complete the task by comparing values from both lists and perform certain actions based on the conditions given.
 */
fun loopThroughLists(rangeStart: Int, rangeEnd: Int, list1: List<Int>, list2: List<Int>) {
/**
 * This exercise aims to challenge the physical therapist to iterate over a specific range and loop through lists simultaneously.
 *
 * The exercise requires the therapist to loop through the given range and access the elements at those indices in both list1 and list2.
 *
 * The therapist needs to modify the code and complete the task by comparing values from both lists and perform certain actions based on the conditions given.
 */
fun loopThroughLists(rangeStart: Int, rangeEnd: Int, list1: List<Int>, list2: List<Int>) {

    // Iterate over the specified range
    for (i in rangeStart..rangeEnd) {
        // Accessing elements from list1 and list2 based on the index
        val element1 = list1[i]
        val element2 = list2[i]

        // Modify code below to solve the exercise
        // ---------------------------------------------------------------------
        //
        // Instructions:
        // 1. Compare element1 and element2.
        // 2. Perform different actions based on the following criteria:
        //       - If element1 is greater than element2, print "Element 1 is greater at index: i".
        //       - If element1 is less than element2, perform a different action.
        // ---------------------------------------------------------------------

        if (element1 > element2) {
            println("Element 1 is greater at index: $i")
        } else {
            // Perform a different action if element1 is less than element2
        }
    }
}