/**
 * Given a list of notes, play the song until the specified key is encountered.
 * Break out of the loop once the key is found.
 *
 * @param notes A list of strings representing musical notes.
 * @param key A string representing the key to break out of the loop.
 */
fun playSong(notes: List<String>, key: String) {

    for (note in notes) {
        println("Playing note: $note")
        if (note == key) {
            break
        }
    }
}
/**
 * Given a list of notes, play the song until the specified key is encountered.
 * Break out of the loop once the key is found.
 *
 * @param notes A list of strings representing musical notes.
 * @param key A string representing the key to break out of the loop.
 */
fun playSong(notes: List<String>, key: String) {
/**
 * Given a list of notes, play the song until the specified key is encountered.
 * Break out of the loop once the key is found.
 *
 * @param notes A list of strings representing musical notes.
 * @param key A string representing the key to break out of the loop.
 */
fun playSong(notes: List<String>, key: String) {

    for (note in notes) {
        println("Playing note: $note")
        if (note == key) {
            break
        }
    }
}