/**
 * This function takes in the name of a musician, the number of songs to play, and the number of instruments available.
 * It simulates the musician playing different songs using different instruments based on certain conditions.
 */
fun playMusic(musicianName: String, numSongs: Int, numInstruments: Int) {

    // Initialize a counter to keep track of the number of songs played
    var songsPlayed = 0

    // Outer while loop to control the number of songs played
    while (songsPlayed < numSongs) {
        // Increment the songsPlayed counter after each iteration
        songsPlayed++

        // Inner while loop to control the number of instruments used for each song
        var instrumentsUsed = 0
        while (instrumentsUsed < numInstruments) {
            // Increment the instrumentsUsed counter after each iteration
            instrumentsUsed++

            // Conditional statement to check if the musician has already used a certain instrument
            if (instrumentsUsed % 2 == 0) {
                // Code block to execute if the musician has already used the instrument
                println("$musicianName uses instrument $instrumentsUsed")
            } else {
                // Code block to execute if the musician hasn't used the instrument
            }
        }
    }
}
/**
 * This function takes in the name of a musician, the number of songs to play, and the number of instruments available.
 * It simulates the musician playing different songs using different instruments based on certain conditions.
 */
fun playMusic(musicianName: String, numSongs: Int, numInstruments: Int) {
/**
 * This function takes in the name of a musician, the number of songs to play, and the number of instruments available.
 * It simulates the musician playing different songs using different instruments based on certain conditions.
 */
fun playMusic(musicianName: String, numSongs: Int, numInstruments: Int) {

    // Initialize a counter to keep track of the number of songs played
    var songsPlayed = 0

    // Outer while loop to control the number of songs played
    while (songsPlayed < numSongs) {
        // Increment the songsPlayed counter after each iteration
        songsPlayed++

        // Inner while loop to control the number of instruments used for each song
        var instrumentsUsed = 0
        while (instrumentsUsed < numInstruments) {
            // Increment the instrumentsUsed counter after each iteration
            instrumentsUsed++

            // Conditional statement to check if the musician has already used a certain instrument
            if (instrumentsUsed % 2 == 0) {
                // Code block to execute if the musician has already used the instrument
                println("$musicianName uses instrument $instrumentsUsed")
            } else {
                // Code block to execute if the musician hasn't used the instrument
            }
        }
    }
}