/**
 * This function takes a dictionary as input and iterates over its elements while indexing each key-value pair.
 * The exercise is to complete the code by correctly iterating over the dictionary and printing the index along with the key and value.
 *
 * @param dictionary A dictionary whose elements need to be iterated over and indexed.
 */
fun iterateAndIndex(dictionary: Map<String, Int>) {

    // Get all the keys from the dictionary
    val keys = dictionary.keys

    // Get the total number of elements in the dictionary
    val totalElements = dictionary.size

    // Start the index from 1
    var index = 1

    // Iterate over the keys and values in the dictionary
    for (key in keys) {
        val value = dictionary[key]

        // Print the index, key, and value of the current element
        println("$index. Key: $key, Value: $value")
        index++
    }
}
/**
 * This function takes a dictionary as input and iterates over its elements while indexing each key-value pair.
 * The exercise is to complete the code by correctly iterating over the dictionary and printing the index along with the key and value.
 *
 * @param dictionary A dictionary whose elements need to be iterated over and indexed.
 */
fun iterateAndIndex(dictionary: Map<String, Int>) {
/**
 * This function takes a dictionary as input and iterates over its elements while indexing each key-value pair.
 * The exercise is to complete the code by correctly iterating over the dictionary and printing the index along with the key and value.
 *
 * @param dictionary A dictionary whose elements need to be iterated over and indexed.
 */
fun iterateAndIndex(dictionary: Map<String, Int>) {

    // Get all the keys from the dictionary
    val keys = dictionary.keys

    // Get the total number of elements in the dictionary
    val totalElements = dictionary.size

    // Start the index from 1
    var index = 1

    // Iterate over the keys and values in the dictionary
    for (key in keys) {
        val value = dictionary[key]

        // Print the index, key, and value of the current element
        println("$index. Key: $key, Value: $value")
        index++
    }
}