/**
 * An astronomer wants to add data of celestial bodies to their observations. The function receives the maximum distance
 * of the celestial bodies and a list containing the names of the bodies already observed.
 *
 * Your task is to iterate over the range from 1 to the maximum distance (inclusive) and for each number, add it as a string
 * to the list of observed celestial bodies. Finally, return the updated list.
 *
 * Example:
 * addData(5, listOf("Sun", "Moon")) should return listOf("Sun", "Moon", "1", "2", "3", "4", "5")
 *
 * Hint: Use the plus operator to concatenate lists.
 *
 * Difficulty: Very Difficult
 */
fun addData(maxDistance: Int, celestialBodies: List<String>): List<String> {

    // Iterate over the range from 1 to the max distance
    val updatedCelestialBodies = celestialBodies.toMutableList()
    for (i in 1..maxDistance) {
        // Convert the number to a string and add it to the list of celestial bodies
        updatedCelestialBodies.add(i.toString())
    }
    return updatedCelestialBodies
}
/**
 * An astronomer wants to add data of celestial bodies to their observations. The function receives the maximum distance
 * of the celestial bodies and a list containing the names of the bodies already observed.
 *
 * Your task is to iterate over the range from 1 to the maximum distance (inclusive) and for each number, add it as a string
 * to the list of observed celestial bodies. Finally, return the updated list.
 *
 * Example:
 * addData(5, listOf("Sun", "Moon")) should return listOf("Sun", "Moon", "1", "2", "3", "4", "5")
 *
 * Hint: Use the plus operator to concatenate lists.
 *
 * Difficulty: Very Difficult
 */
fun addData(maxDistance: Int, celestialBodies: List<String>): List<String> {
/**
 * An astronomer wants to add data of celestial bodies to their observations. The function receives the maximum distance
 * of the celestial bodies and a list containing the names of the bodies already observed.
 *
 * Your task is to iterate over the range from 1 to the maximum distance (inclusive) and for each number, add it as a string
 * to the list of observed celestial bodies. Finally, return the updated list.
 *
 * Example:
 * addData(5, listOf("Sun", "Moon")) should return listOf("Sun", "Moon", "1", "2", "3", "4", "5")
 *
 * Hint: Use the plus operator to concatenate lists.
 *
 * Difficulty: Very Difficult
 */
fun addData(maxDistance: Int, celestialBodies: List<String>): List<String> {

    // Iterate over the range from 1 to the max distance
    val updatedCelestialBodies = celestialBodies.toMutableList()
    for (i in 1..maxDistance) {
        // Convert the number to a string and add it to the list of celestial bodies
        updatedCelestialBodies.add(i.toString())
    }
    return updatedCelestialBodies
}