/**
 * This exercise requires creating a tuple from a range of values and performing subtraction.
 * The goal is to create a tuple with values from the given start to end (exclusive), and find the difference
 * between the maximum and minimum values in the tuple.
 *
 * @param start The starting value for the range (inclusive).
 * @param end The ending value for the range (exclusive).
 * @return The difference between the maximum and minimum values in the tuple.
 *
 * Example:
 * createMusicianTuple(1, 6) -> 4
 * createMusicianTuple(10, 20) -> 9
 */
fun createMusicianTuple(start: Int, end: Int): Int {

    // Create a tuple of values from start to end
    val musicianTuple = (start until end).toList()

    // Find the minimum value in the tuple
    val minValue = musicianTuple.minOrNull() ?: 0

    // Find the maximum value in the tuple
    val maxValue = musicianTuple.maxOrNull() ?: 0

    // Calculate the difference between the maximum and minimum values
    val difference = maxValue - minValue

    return difference
}
/**
 * This exercise requires creating a tuple from a range of values and performing subtraction.
 * The goal is to create a tuple with values from the given start to end (exclusive), and find the difference
 * between the maximum and minimum values in the tuple.
 *
 * @param start The starting value for the range (inclusive).
 * @param end The ending value for the range (exclusive).
 * @return The difference between the maximum and minimum values in the tuple.
 *
 * Example:
 * createMusicianTuple(1, 6) -> 4
 * createMusicianTuple(10, 20) -> 9
 */
fun createMusicianTuple(start: Int, end: Int): Int {
/**
 * This exercise requires creating a tuple from a range of values and performing subtraction.
 * The goal is to create a tuple with values from the given start to end (exclusive), and find the difference
 * between the maximum and minimum values in the tuple.
 *
 * @param start The starting value for the range (inclusive).
 * @param end The ending value for the range (exclusive).
 * @return The difference between the maximum and minimum values in the tuple.
 *
 * Example:
 * createMusicianTuple(1, 6) -> 4
 * createMusicianTuple(10, 20) -> 9
 */
fun createMusicianTuple(start: Int, end: Int): Int {

    // Create a tuple of values from start to end
    val musicianTuple = (start until end).toList()

    // Find the minimum value in the tuple
    val minValue = musicianTuple.minOrNull() ?: 0

    // Find the maximum value in the tuple
    val maxValue = musicianTuple.maxOrNull() ?: 0

    // Calculate the difference between the maximum and minimum values
    val difference = maxValue - minValue

    return difference
}