/**
 * This exercise requires iterating through a set and accessing items in a dictionary.
 *
 * Given a set of astronomers and their respective discoveries, the function should iterate through the set and
 * access the details of each discovery from a dictionary.
 *
 * @param dictSet A dictionary containing the astronomers as keys and their discoveries as values.
 * @return A formatted string displaying the details of each discovery.
 *
 * Example:
 * Input:
 * dictSet = mapOf(
 *     "Galileo Galilei" to "Galilean moons",
 *     "Isaac Newton" to "Law of universal gravitation",
 *     "Albert Einstein" to "Theory of relativity"
 * )
 * Output:
 * "Galileo Galilei is known for discovering the Galilean moons.
 * Isaac Newton is known for discovering the Law of universal gravitation.
 * Albert Einstein is known for discovering the Theory of relativity."
 */
fun iterateDictSet(dictSet: Map<String, String>): String {

    var result = ""
    for ((astronomer, discovery) in dictSet) {
        result += "$astronomer is known for discovering $discovery.\n"
    }
    return result
}
/**
 * This exercise requires iterating through a set and accessing items in a dictionary.
 *
 * Given a set of astronomers and their respective discoveries, the function should iterate through the set and
 * access the details of each discovery from a dictionary.
 *
 * @param dictSet A dictionary containing the astronomers as keys and their discoveries as values.
 * @return A formatted string displaying the details of each discovery.
 *
 * Example:
 * Input:
 * dictSet = mapOf(
 *     "Galileo Galilei" to "Galilean moons",
 *     "Isaac Newton" to "Law of universal gravitation",
 *     "Albert Einstein" to "Theory of relativity"
 * )
 * Output:
 * "Galileo Galilei is known for discovering the Galilean moons.
 * Isaac Newton is known for discovering the Law of universal gravitation.
 * Albert Einstein is known for discovering the Theory of relativity."
 */
fun iterateDictSet(dictSet: Map<String, String>): String {
/**
 * This exercise requires iterating through a set and accessing items in a dictionary.
 *
 * Given a set of astronomers and their respective discoveries, the function should iterate through the set and
 * access the details of each discovery from a dictionary.
 *
 * @param dictSet A dictionary containing the astronomers as keys and their discoveries as values.
 * @return A formatted string displaying the details of each discovery.
 *
 * Example:
 * Input:
 * dictSet = mapOf(
 *     "Galileo Galilei" to "Galilean moons",
 *     "Isaac Newton" to "Law of universal gravitation",
 *     "Albert Einstein" to "Theory of relativity"
 * )
 * Output:
 * "Galileo Galilei is known for discovering the Galilean moons.
 * Isaac Newton is known for discovering the Law of universal gravitation.
 * Albert Einstein is known for discovering the Theory of relativity."
 */
fun iterateDictSet(dictSet: Map<String, String>): String {

    var result = ""
    for ((astronomer, discovery) in dictSet) {
        result += "$astronomer is known for discovering $discovery.\n"
    }
    return result
}