/**
 * This exercise focuses on the concept of short-circuiting and indexing tuples.
 * Given a tuple and an index, the task is to access the value at the specified index in the tuple using short-circuiting.
 *
 * @param tup a tuple containing n elements
 * @param index an integer representing the index position to access in the tuple (0 <= index <= n-1)
 * @return the value at the specified index if it exists; otherwise, 'Index out of range!'
 */
fun accessTuple(tup: List<String>, index: Int): String {

    return if (index in 0 until tup.size) tup[index] else "Index out of range!"
}
/**
 * This exercise focuses on the concept of short-circuiting and indexing tuples.
 * Given a tuple and an index, the task is to access the value at the specified index in the tuple using short-circuiting.
 *
 * @param tup a tuple containing n elements
 * @param index an integer representing the index position to access in the tuple (0 <= index <= n-1)
 * @return the value at the specified index if it exists; otherwise, 'Index out of range!'
 */
fun accessTuple(tup: List<String>, index: Int): String {
/**
 * This exercise focuses on the concept of short-circuiting and indexing tuples.
 * Given a tuple and an index, the task is to access the value at the specified index in the tuple using short-circuiting.
 *
 * @param tup a tuple containing n elements
 * @param index an integer representing the index position to access in the tuple (0 <= index <= n-1)
 * @return the value at the specified index if it exists; otherwise, 'Index out of range!'
 */
fun accessTuple(tup: List<String>, index: Int): String {

    return if (index in 0 until tup.size) tup[index] else "Index out of range!"
}