/**
 * This function takes in a playlist of songs and plays them using nested while loops. It uses tuples to store information about each song.
 *
 * @param playlist A list of tuples. Each tuple represents a song and contains the following information: (songName, artistName, duration).
 */
fun playMusic(playlist: List<Triple<String, String, Int>>) {

    // Start playing music
    var index = 0

    while (index < playlist.size) {
        val (songName, artistName, duration) = playlist[index]

        // Play the current song
        println("Now playing: $songName by $artistName")

        // Count down the duration of the song
        var remainingDuration = duration
        while (remainingDuration > 0) {
            println("Time Remaining: $remainingDuration")
            remainingDuration--
        }

        // Move to the next song in the playlist
        index++
    }
}
/**
 * This function takes in a playlist of songs and plays them using nested while loops. It uses tuples to store information about each song.
 *
 * @param playlist A list of tuples. Each tuple represents a song and contains the following information: (songName, artistName, duration).
 */
fun playMusic(playlist: List<Triple<String, String, Int>>) {
/**
 * This function takes in a playlist of songs and plays them using nested while loops. It uses tuples to store information about each song.
 *
 * @param playlist A list of tuples. Each tuple represents a song and contains the following information: (songName, artistName, duration).
 */
fun playMusic(playlist: List<Triple<String, String, Int>>) {

    // Start playing music
    var index = 0

    while (index < playlist.size) {
        val (songName, artistName, duration) = playlist[index]

        // Play the current song
        println("Now playing: $songName by $artistName")

        // Count down the duration of the song
        var remainingDuration = duration
        while (remainingDuration > 0) {
            println("Time Remaining: $remainingDuration")
            remainingDuration--
        }

        // Move to the next song in the playlist
        index++
    }
}