/**
 * This function simulates a musician playing music on a given instrument.
 * The notes provided should be a list of integers, where each integer represents a note.
 *
 * Fill in the missing parts of the function to make it play the notes on the provided instrument.
 *
 * @param instrument The instrument the musician is playing.
 * @param notes A list of integers representing the notes to be played.
 */
fun playMusic(instrument: String, notes: List<Int>) {

    if (instrument == "guitar") {
        val strings = 6
        val neckFrets = 19
        var currentString = 1
        var currentFret = 1
        while (currentString <= strings) {
            while (currentFret <= neckFrets) {
                when (currentString) {
                    1 -> {
                        if (currentFret > 12) {
                            println("Skip the high pitched notes")
                            currentFret++
                            continue
                        }
                    }
                    2 -> {
                        if (currentFret < 3 || currentFret > 15) {
                            println("Avoid the lowest and highest notes")
                            currentFret++
                            continue
                        }
                    }
                    3 -> {
                        // Add conditions for string 3
                    }
                    // Add conditions for other strings
                }
                // Play the note on the current string and fret
                println("Playing note: ${notes[currentString - 1]} on string $currentString, fret $currentFret")
                currentFret++
            }
            currentString++
            currentFret = 1
        }
    }
}
/**
 * This function simulates a musician playing music on a given instrument.
 * The notes provided should be a list of integers, where each integer represents a note.
 *
 * Fill in the missing parts of the function to make it play the notes on the provided instrument.
 *
 * @param instrument The instrument the musician is playing.
 * @param notes A list of integers representing the notes to be played.
 */
fun playMusic(instrument: String, notes: List<Int>) {
/**
 * This function simulates a musician playing music on a given instrument.
 * The notes provided should be a list of integers, where each integer represents a note.
 *
 * Fill in the missing parts of the function to make it play the notes on the provided instrument.
 *
 * @param instrument The instrument the musician is playing.
 * @param notes A list of integers representing the notes to be played.
 */
fun playMusic(instrument: String, notes: List<Int>) {

    if (instrument == "guitar") {
        val strings = 6
        val neckFrets = 19
        var currentString = 1
        var currentFret = 1
        while (currentString <= strings) {
            while (currentFret <= neckFrets) {
                when (currentString) {
                    1 -> {
                        if (currentFret > 12) {
                            println("Skip the high pitched notes")
                            currentFret++
                            continue
                        }
                    }
                    2 -> {
                        if (currentFret < 3 || currentFret > 15) {
                            println("Avoid the lowest and highest notes")
                            currentFret++
                            continue
                        }
                    }
                    3 -> {
                        // Add conditions for string 3
                    }
                    // Add conditions for other strings
                }
                // Play the note on the current string and fret
                println("Playing note: ${notes[currentString - 1]} on string $currentString, fret $currentFret")
                currentFret++
            }
            currentString++
            currentFret = 1
        }
    }
}