/**
 * A psychologist wants to create a program that generates a range of numbers based on the start
 * and stop parameters provided, and then determines the index at which a specific number is found
 * within that range. However, the psychologist is facing difficulty in implementing the "index()"
 * method correctly.
 *
 * Complete the code below to help the psychologist solve the problem by:
 * - Creating a range of numbers from the start to the stop parameters.
 * - Finding the index of the number specified in the range using the "indexOf()" method.
 *
 * Return the index of the specified number in the range.
 *
 * Difficulty level: ★★★★★
 */
fun findIndexInRange(start: Int, stop: Int): Int {

    // Generate a range of numbers from start to stop
    val numbersRange = (start..stop).toList()

    // Define the specific number to search for in the range
    val targetNumber: Int? = null

    // Psychologist's attempt: Complete the code to find the index of the targetNumber in the numbersRange
    val targetIndex = numbersRange.indexOf(targetNumber ?: -1)

    return targetIndex
}
/**
 * A psychologist wants to create a program that generates a range of numbers based on the start
 * and stop parameters provided, and then determines the index at which a specific number is found
 * within that range. However, the psychologist is facing difficulty in implementing the "index()"
 * method correctly.
 *
 * Complete the code below to help the psychologist solve the problem by:
 * - Creating a range of numbers from the start to the stop parameters.
 * - Finding the index of the number specified in the range using the "indexOf()" method.
 *
 * Return the index of the specified number in the range.
 *
 * Difficulty level: ★★★★★
 */
fun findIndexInRange(start: Int, stop: Int): Int {
/**
 * A psychologist wants to create a program that generates a range of numbers based on the start
 * and stop parameters provided, and then determines the index at which a specific number is found
 * within that range. However, the psychologist is facing difficulty in implementing the "index()"
 * method correctly.
 *
 * Complete the code below to help the psychologist solve the problem by:
 * - Creating a range of numbers from the start to the stop parameters.
 * - Finding the index of the number specified in the range using the "indexOf()" method.
 *
 * Return the index of the specified number in the range.
 *
 * Difficulty level: ★★★★★
 */
fun findIndexInRange(start: Int, stop: Int): Int {

    // Generate a range of numbers from start to stop
    val numbersRange = (start..stop).toList()

    // Define the specific number to search for in the range
    val targetNumber: Int? = null

    // Psychologist's attempt: Complete the code to find the index of the targetNumber in the numbersRange
    val targetIndex = numbersRange.indexOf(targetNumber ?: -1)

    return targetIndex
}