/**
 * Calculates the distance between two cities and determines whether the intersection is a branch or not.
 *
 * @param city1 The name of the first city.
 * @param city2 The name of the second city.
 * @return The distance between the two cities and whether the intersection is a branch or not.
 */
import kotlin.random.Random


fun intersectionDistance(city1: String, city2: String): String {

    val distance = Random.nextInt(1, 1001)
    val intersectionType = when {
        distance <= 500 -> "Branch"
        distance >= 1000 -> "Not a branch"
        else -> "Indeterminate"
    }
    return "The distance between $city1 and $city2 is $distance km. The intersection is $intersectionType."
}
import kotlin.random.Random

/**
 * Calculates the distance between two cities and determines whether the intersection is a branch or not.
 *
 * @param city1 The name of the first city.
 * @param city2 The name of the second city.
 * @return The distance between the two cities and whether the intersection is a branch or not.
 */
fun intersectionDistance(city1: String, city2: String): String {
import kotlin.random.Random

/**
 * Calculates the distance between two cities and determines whether the intersection is a branch or not.
 *
 * @param city1 The name of the first city.
 * @param city2 The name of the second city.
 * @return The distance between the two cities and whether the intersection is a branch or not.
 */
fun intersectionDistance(city1: String, city2: String): String {

    val distance = Random.nextInt(1, 1001)
    val intersectionType = when {
        distance <= 500 -> "Branch"
        distance >= 1000 -> "Not a branch"
        else -> "Indeterminate"
    }
    return "The distance between $city1 and $city2 is $distance km. The intersection is $intersectionType."
}