/**
 * Calculate the average of all numbers between 'start' (inclusive) and 'stop' (exclusive).
 *
 * @param start An integer representing the start value of the range.
 * @param stop An integer representing the stop value of the range.
 * @return The average of all numbers between 'start' (inclusive) and 'stop' (exclusive).
 *
 * Example:
 * findAverage(1, 10) => 5.5
 * findAverage(-5, 5) => 0.0
 */
fun findAverage(start: Int, stop: Int): Double {

    val numbers = (start until stop).toList()  // Create a range with start and stop parameters
    val sumNumbers = numbers.sum()  // Sum all numbers in the range
    val average = sumNumbers.toDouble() / numbers.size  // Calculate the average

    return average
}
/**
 * Calculate the average of all numbers between 'start' (inclusive) and 'stop' (exclusive).
 *
 * @param start An integer representing the start value of the range.
 * @param stop An integer representing the stop value of the range.
 * @return The average of all numbers between 'start' (inclusive) and 'stop' (exclusive).
 *
 * Example:
 * findAverage(1, 10) => 5.5
 * findAverage(-5, 5) => 0.0
 */
fun findAverage(start: Int, stop: Int): Double {
/**
 * Calculate the average of all numbers between 'start' (inclusive) and 'stop' (exclusive).
 *
 * @param start An integer representing the start value of the range.
 * @param stop An integer representing the stop value of the range.
 * @return The average of all numbers between 'start' (inclusive) and 'stop' (exclusive).
 *
 * Example:
 * findAverage(1, 10) => 5.5
 * findAverage(-5, 5) => 0.0
 */
fun findAverage(start: Int, stop: Int): Double {

    val numbers = (start until stop).toList()  // Create a range with start and stop parameters
    val sumNumbers = numbers.sum()  // Sum all numbers in the range
    val average = sumNumbers.toDouble() / numbers.size  // Calculate the average

    return average
}