/**
 * Count the number of times a specific note appears in the given music map.
 *
 * @param music A map containing notes as keys and their corresponding counts as values.
 * @param note The note to count.
 * @return The number of times the note appears in the music map.
 *
 * Example:
 * music = mapOf("C" to 2, "D" to 4, "E" to 1, "F" to 3)
 * countNotes(music, "E") // 1
 * countNotes(music, "G") // 0
 */
fun countNotes(music: Map<String, Int>, note: String): Int {

    return music.getOrDefault(note, 0)  // Using map's getOrDefault method to return the count of the note,
                                       // or 0 if the note is not present in the map.
}
/**
 * Count the number of times a specific note appears in the given music map.
 *
 * @param music A map containing notes as keys and their corresponding counts as values.
 * @param note The note to count.
 * @return The number of times the note appears in the music map.
 *
 * Example:
 * music = mapOf("C" to 2, "D" to 4, "E" to 1, "F" to 3)
 * countNotes(music, "E") // 1
 * countNotes(music, "G") // 0
 */
fun countNotes(music: Map<String, Int>, note: String): Int {
/**
 * Count the number of times a specific note appears in the given music map.
 *
 * @param music A map containing notes as keys and their corresponding counts as values.
 * @param note The note to count.
 * @return The number of times the note appears in the music map.
 *
 * Example:
 * music = mapOf("C" to 2, "D" to 4, "E" to 1, "F" to 3)
 * countNotes(music, "E") // 1
 * countNotes(music, "G") // 0
 */
fun countNotes(music: Map<String, Int>, note: String): Int {

    return music.getOrDefault(note, 0)  // Using map's getOrDefault method to return the count of the note,
                                       // or 0 if the note is not present in the map.
}