/**
 * Given a dictionary containing information about an artist, this function
 * updates the value of a specified key with a new value.
 *
 * @param artistInfo A dictionary containing information about an artist
 * @param key The key for which the value needs to be updated
 * @param newValue The new value to be updated for the specified key
 * @return The updated artistInfo dictionary
 */
fun changeArtistInfo(artistInfo: MutableMap<String, Any>, key: String, newValue: Any): MutableMap<String, Any> {

    // Update the value of the specified key with the new value
    artistInfo[key] = newValue
    return artistInfo
}

// Dictionary containing information about an artist
val artist = mutableMapOf(
    "name" to "Leonardo da Vinci",
    "birth_year" to 1452,
    "nationality" to "Italian",
    "famous_works" to listOf("Mona Lisa", "The Last Supper", "Vitruvian Man"),
    "techniques" to listOf("sfumato", "chiaroscuro", "perspective"),
    "inventions" to listOf("flying machine", "parachute", "tank")
)

// Example usage of the function
val updatedArtistInfo = changeArtistInfo(artist, "nationality", "Italian Renaissance")
/**
 * Given a dictionary containing information about an artist, this function
 * updates the value of a specified key with a new value.
 *
 * @param artistInfo A dictionary containing information about an artist
 * @param key The key for which the value needs to be updated
 * @param newValue The new value to be updated for the specified key
 * @return The updated artistInfo dictionary
 */
fun changeArtistInfo(artistInfo: MutableMap<String, Any>, key: String, newValue: Any): MutableMap<String, Any> {
/**
 * Given a dictionary containing information about an artist, this function
 * updates the value of a specified key with a new value.
 *
 * @param artistInfo A dictionary containing information about an artist
 * @param key The key for which the value needs to be updated
 * @param newValue The new value to be updated for the specified key
 * @return The updated artistInfo dictionary
 */
fun changeArtistInfo(artistInfo: MutableMap<String, Any>, key: String, newValue: Any): MutableMap<String, Any> {

    // Update the value of the specified key with the new value
    artistInfo[key] = newValue
    return artistInfo
}

// Dictionary containing information about an artist
val artist = mutableMapOf(
    "name" to "Leonardo da Vinci",
    "birth_year" to 1452,
    "nationality" to "Italian",
    "famous_works" to listOf("Mona Lisa", "The Last Supper", "Vitruvian Man"),
    "techniques" to listOf("sfumato", "chiaroscuro", "perspective"),
    "inventions" to listOf("flying machine", "parachute", "tank")
)

// Example usage of the function
val updatedArtistInfo = changeArtistInfo(artist, "nationality", "Italian Renaissance")