/**
 * This exercise is focused on creating a list of historians' names with their corresponding birth years.
 *
 * You are given two lists, 'years" and 'names`. Your task is to create a list of historian names with their corresponding birth years in the format 'name (year)'.
 *
 * Example:
 * For the input lists:
 * years = [1797, 1822, 1863, 1902]
 * names = ['Karl Marx', 'Friedrich Engels', 'Max Weber', 'Edward Said']
 *
 * The expected output is:
 * ['Karl Marx (1797)', 'Friedrich Engels (1822)', 'Max Weber (1863)', 'Edward Said (1902)']
 */
fun createHistorianList(years: List<Int>, names: List<String>): List<String> {

    val historianList = mutableListOf<String>()  // Initialize the list to store the historian names with their birth years

    for (i in years.indices) {
        val name = names[i]
        val year = years[i]
        historianList.add("$name ($year)")
    }

    return historianList
}
/**
 * This exercise is focused on creating a list of historians' names with their corresponding birth years.
 *
 * You are given two lists, 'years" and 'names`. Your task is to create a list of historian names with their corresponding birth years in the format 'name (year)'.
 *
 * Example:
 * For the input lists:
 * years = [1797, 1822, 1863, 1902]
 * names = ['Karl Marx', 'Friedrich Engels', 'Max Weber', 'Edward Said']
 *
 * The expected output is:
 * ['Karl Marx (1797)', 'Friedrich Engels (1822)', 'Max Weber (1863)', 'Edward Said (1902)']
 */
fun createHistorianList(years: List<Int>, names: List<String>): List<String> {
/**
 * This exercise is focused on creating a list of historians' names with their corresponding birth years.
 *
 * You are given two lists, 'years" and 'names`. Your task is to create a list of historian names with their corresponding birth years in the format 'name (year)'.
 *
 * Example:
 * For the input lists:
 * years = [1797, 1822, 1863, 1902]
 * names = ['Karl Marx', 'Friedrich Engels', 'Max Weber', 'Edward Said']
 *
 * The expected output is:
 * ['Karl Marx (1797)', 'Friedrich Engels (1822)', 'Max Weber (1863)', 'Edward Said (1902)']
 */
fun createHistorianList(years: List<Int>, names: List<String>): List<String> {

    val historianList = mutableListOf<String>()  // Initialize the list to store the historian names with their birth years

    for (i in years.indices) {
        val name = names[i]
        val year = years[i]
        historianList.add("$name ($year)")
    }

    return historianList
}