/**
 * Given a list of astronomical objects represented as pairs,
 * containing the name of the object and its distance from Earth,
 * return a new list containing only the names of objects that are closer than 1000 light-years.
 *
 * Example:
 * val objects = listOf(Pair("Alpha Centauri", 4.37), Pair("Crab Nebula", 6500.0), Pair("Andromeda Galaxy", 2000000.0))
 * val filteredObjects = filterAstronomicalObjects(objects)
 * println(filteredObjects)  // Output: ['Alpha Centauri']
 */
fun filterAstronomicalObjects(objects: List<Pair<String, Double>>): List<String> {

    val filteredObjects = mutableListOf<String>()
    for (obj in objects) {
        val (name, distance) = obj
        if (distance >= 1000) {
            continue
        }
        filteredObjects.add(name)
    }
    return filteredObjects
}
/**
 * Given a list of astronomical objects represented as pairs,
 * containing the name of the object and its distance from Earth,
 * return a new list containing only the names of objects that are closer than 1000 light-years.
 *
 * Example:
 * val objects = listOf(Pair("Alpha Centauri", 4.37), Pair("Crab Nebula", 6500.0), Pair("Andromeda Galaxy", 2000000.0))
 * val filteredObjects = filterAstronomicalObjects(objects)
 * println(filteredObjects)  // Output: ['Alpha Centauri']
 */
fun filterAstronomicalObjects(objects: List<Pair<String, Double>>): List<String> {
/**
 * Given a list of astronomical objects represented as pairs,
 * containing the name of the object and its distance from Earth,
 * return a new list containing only the names of objects that are closer than 1000 light-years.
 *
 * Example:
 * val objects = listOf(Pair("Alpha Centauri", 4.37), Pair("Crab Nebula", 6500.0), Pair("Andromeda Galaxy", 2000000.0))
 * val filteredObjects = filterAstronomicalObjects(objects)
 * println(filteredObjects)  // Output: ['Alpha Centauri']
 */
fun filterAstronomicalObjects(objects: List<Pair<String, Double>>): List<String> {

    val filteredObjects = mutableListOf<String>()
    for (obj in objects) {
        val (name, distance) = obj
        if (distance >= 1000) {
            continue
        }
        filteredObjects.add(name)
    }
    return filteredObjects
}