/**
 * This exercise requires you to create a tuple of complex numbers from a range of values.
 *
 * Instructions:
 * - The function takes two parameters, 'start' and 'end', which represents the range of values.
 * - Your task is to create a tuple containing complex numbers from 'start' (inclusive) to 'end' (exclusive).
 * - Each complex number in the tuple should have the real part equal to the respective value in the range,
 *   and the imaginary part equal to the value squared.
 * - Return the resulting tuple.
 *
 * Example:
 * createComplexTuples(-2, 3) -> ((-2+4j), (-1+1j), (0+0j), (1+1j), (2+4j))
 *
 * Note:
 * - The complex numbers in the tuple should follow the format: real+imaginaryj.
 * - You can use the built-in 'toComplex()' function and the 'range()' function to solve this exercise.
 * - Pay attention to the inclusive and exclusive boundaries of the 'range()' function.
 */
fun createComplexTuples(start: Int, end: Int): List<Pair<Double, Double>> {

    return (start until end).map { num -> Pair(num.toDouble(), (num * num).toDouble()) }
}
/**
 * This exercise requires you to create a tuple of complex numbers from a range of values.
 *
 * Instructions:
 * - The function takes two parameters, 'start' and 'end', which represents the range of values.
 * - Your task is to create a tuple containing complex numbers from 'start' (inclusive) to 'end' (exclusive).
 * - Each complex number in the tuple should have the real part equal to the respective value in the range,
 *   and the imaginary part equal to the value squared.
 * - Return the resulting tuple.
 *
 * Example:
 * createComplexTuples(-2, 3) -> ((-2+4j), (-1+1j), (0+0j), (1+1j), (2+4j))
 *
 * Note:
 * - The complex numbers in the tuple should follow the format: real+imaginaryj.
 * - You can use the built-in 'toComplex()' function and the 'range()' function to solve this exercise.
 * - Pay attention to the inclusive and exclusive boundaries of the 'range()' function.
 */
fun createComplexTuples(start: Int, end: Int): List<Pair<Double, Double>> {
/**
 * This exercise requires you to create a tuple of complex numbers from a range of values.
 *
 * Instructions:
 * - The function takes two parameters, 'start' and 'end', which represents the range of values.
 * - Your task is to create a tuple containing complex numbers from 'start' (inclusive) to 'end' (exclusive).
 * - Each complex number in the tuple should have the real part equal to the respective value in the range,
 *   and the imaginary part equal to the value squared.
 * - Return the resulting tuple.
 *
 * Example:
 * createComplexTuples(-2, 3) -> ((-2+4j), (-1+1j), (0+0j), (1+1j), (2+4j))
 *
 * Note:
 * - The complex numbers in the tuple should follow the format: real+imaginaryj.
 * - You can use the built-in 'toComplex()' function and the 'range()' function to solve this exercise.
 * - Pay attention to the inclusive and exclusive boundaries of the 'range()' function.
 */
fun createComplexTuples(start: Int, end: Int): List<Pair<Double, Double>> {

    return (start until end).map { num -> Pair(num.toDouble(), (num * num).toDouble()) }
}