/**
 * This function takes an artist's name and a tuple representing the artist's information.
 * It updates the artist's information by replacing the current tuple with a new tuple containing the updated information.
 * The updated information includes the artist's name, birth year, and category.
 * The function then returns the new updated tuple.
 *
 * @param artistName The name of the artist.
 * @param artistTuple The current tuple representing the artist's information.
 * @return The new tuple with the updated artist's information.
 */
fun updateArtist(artistName: String, artistTuple: Triple<String, String, String>): Triple<String, String, String> {

    // Extracting current information from the tuple
    val (currentName, birthYear, category) = artistTuple

    // Prompting the user to update the information
    print("Enter the artist's updated name: ")
    val newName = readLine() ?: ""
    print("Enter the artist's updated birth year: ")
    val newBirthYear = readLine() ?: ""
    print("Enter the artist's updated category: ")
    val newCategory = readLine() ?: ""

    // Updating the artist tuple with the new information
    return Triple(newName, newBirthYear, newCategory)
}

// Example usage
val artist = Triple("Vincent van Gogh", "1853", "Post-Impressionist")
val updatedArtist = updateArtist(artist.first, artist)
/**
 * This function takes an artist's name and a tuple representing the artist's information.
 * It updates the artist's information by replacing the current tuple with a new tuple containing the updated information.
 * The updated information includes the artist's name, birth year, and category.
 * The function then returns the new updated tuple.
 *
 * @param artistName The name of the artist.
 * @param artistTuple The current tuple representing the artist's information.
 * @return The new tuple with the updated artist's information.
 */
fun updateArtist(artistName: String, artistTuple: Triple<String, String, String>): Triple<String, String, String> {
/**
 * This function takes an artist's name and a tuple representing the artist's information.
 * It updates the artist's information by replacing the current tuple with a new tuple containing the updated information.
 * The updated information includes the artist's name, birth year, and category.
 * The function then returns the new updated tuple.
 *
 * @param artistName The name of the artist.
 * @param artistTuple The current tuple representing the artist's information.
 * @return The new tuple with the updated artist's information.
 */
fun updateArtist(artistName: String, artistTuple: Triple<String, String, String>): Triple<String, String, String> {

    // Extracting current information from the tuple
    val (currentName, birthYear, category) = artistTuple

    // Prompting the user to update the information
    print("Enter the artist's updated name: ")
    val newName = readLine() ?: ""
    print("Enter the artist's updated birth year: ")
    val newBirthYear = readLine() ?: ""
    print("Enter the artist's updated category: ")
    val newCategory = readLine() ?: ""

    // Updating the artist tuple with the new information
    return Triple(newName, newBirthYear, newCategory)
}

// Example usage
val artist = Triple("Vincent van Gogh", "1853", "Post-Impressionist")
val updatedArtist = updateArtist(artist.first, artist)