/**
 * This exercise focuses on iterating over each character of a string and understanding the precedence of logical operators.
 * Given a book title and a dictionary of library records, write a Kotlin function that prints the availability status of each book.
 *
 * @param bookTitle The title of the book to check for availability.
 * @param libraryRecords A dictionary where the keys represent book titles and the values represent availability status (true or false).
 */
fun printBookAvailability(bookTitle: String, libraryRecords: Map<String, Boolean>) {

    println("The availability of each book:")
    for ((title, available) in libraryRecords) {
        val availabilityStatus = if (available) "Available" else "Not available"
        println("- $title: $availabilityStatus")
    }
}

// Example usage
/**
 * This exercise focuses on iterating over each character of a string and understanding the precedence of logical operators.
 * Given a book title and a dictionary of library records, write a Kotlin function that prints the availability status of each book.
 *
 * @param bookTitle The title of the book to check for availability.
 * @param libraryRecords A dictionary where the keys represent book titles and the values represent availability status (true or false).
 */
fun printBookAvailability(bookTitle: String, libraryRecords: Map<String, Boolean>) {
/**
 * This exercise focuses on iterating over each character of a string and understanding the precedence of logical operators.
 * Given a book title and a dictionary of library records, write a Kotlin function that prints the availability status of each book.
 *
 * @param bookTitle The title of the book to check for availability.
 * @param libraryRecords A dictionary where the keys represent book titles and the values represent availability status (true or false).
 */
fun printBookAvailability(bookTitle: String, libraryRecords: Map<String, Boolean>) {

    println("The availability of each book:")
    for ((title, available) in libraryRecords) {
        val availabilityStatus = if (available) "Available" else "Not available"
        println("- $title: $availabilityStatus")
    }
}

// Example usage