/**
 * Given a list 'objects' containing information about celestial objects and their distances from Earth,
 * calculate the total distance of all objects from Earth.
 *
 * @param objects List<Pair<String, Float>> A list of pairs representing the objects and their distances.
 * @return Float The total distance of all objects from Earth.
 */
fun calculateTotalDistance(objects: List<Pair<String, Float>>): Float {

    var totalDistance = 0.0f

    for (objectInfo in objects) {
        val (_, objectDistance) = objectInfo
        totalDistance += objectDistance
    }

    return totalDistance
}
/**
 * Given a list 'objects' containing information about celestial objects and their distances from Earth,
 * calculate the total distance of all objects from Earth.
 *
 * @param objects List<Pair<String, Float>> A list of pairs representing the objects and their distances.
 * @return Float The total distance of all objects from Earth.
 */
fun calculateTotalDistance(objects: List<Pair<String, Float>>): Float {
/**
 * Given a list 'objects' containing information about celestial objects and their distances from Earth,
 * calculate the total distance of all objects from Earth.
 *
 * @param objects List<Pair<String, Float>> A list of pairs representing the objects and their distances.
 * @return Float The total distance of all objects from Earth.
 */
fun calculateTotalDistance(objects: List<Pair<String, Float>>): Float {

    var totalDistance = 0.0f

    for (objectInfo in objects) {
        val (_, objectDistance) = objectInfo
        totalDistance += objectDistance
    }

    return totalDistance
}