/**
 * You are a musician and you have a dictionary that contains the details of all your songs.
 * Each song is represented by a dictionary with the following keys: 'title', 'artist', 'genre', and 'bpm'.
 *
 * You want to find a specific song based on its bpm (beats per minute).
 * You need to implement the function findSongByBpm that receives a song dictionary and a bpm
 * as arguments, and returns true if the song's bpm matches the given bpm, and false otherwise.
 *
 * For example:
 * val song = mapOf("title" to "Song1", "artist" to "Artist1", "genre" to "Pop", "bpm" to 120)
 * findSongByBpm(song, 120)
 *
 * Expected output:
 * true
 */
fun findSongByBpm(songDict: Map<String, Any>, bpm: Int): Boolean {

    // Iterate over each song dictionary in the map
    for ((key, value) in songDict) {
        // Check if the 'bpm' key exists in the current song dictionary
        if (key == "bpm") {
            // Check if the bpm of the current song matches the given bpm
            if (value == bpm) {
                return true
            }
        }
    }
    return false
}
/**
 * You are a musician and you have a dictionary that contains the details of all your songs.
 * Each song is represented by a dictionary with the following keys: 'title', 'artist', 'genre', and 'bpm'.
 *
 * You want to find a specific song based on its bpm (beats per minute).
 * You need to implement the function findSongByBpm that receives a song dictionary and a bpm
 * as arguments, and returns true if the song's bpm matches the given bpm, and false otherwise.
 *
 * For example:
 * val song = mapOf("title" to "Song1", "artist" to "Artist1", "genre" to "Pop", "bpm" to 120)
 * findSongByBpm(song, 120)
 *
 * Expected output:
 * true
 */
fun findSongByBpm(songDict: Map<String, Any>, bpm: Int): Boolean {
/**
 * You are a musician and you have a dictionary that contains the details of all your songs.
 * Each song is represented by a dictionary with the following keys: 'title', 'artist', 'genre', and 'bpm'.
 *
 * You want to find a specific song based on its bpm (beats per minute).
 * You need to implement the function findSongByBpm that receives a song dictionary and a bpm
 * as arguments, and returns true if the song's bpm matches the given bpm, and false otherwise.
 *
 * For example:
 * val song = mapOf("title" to "Song1", "artist" to "Artist1", "genre" to "Pop", "bpm" to 120)
 * findSongByBpm(song, 120)
 *
 * Expected output:
 * true
 */
fun findSongByBpm(songDict: Map<String, Any>, bpm: Int): Boolean {

    // Iterate over each song dictionary in the map
    for ((key, value) in songDict) {
        // Check if the 'bpm' key exists in the current song dictionary
        if (key == "bpm") {
            // Check if the bpm of the current song matches the given bpm
            if (value == bpm) {
                return true
            }
        }
    }
    return false
}