/**
 * Given the title of a book and the inventory of books, this function checks whether the book is available or not.
 *
 * @param title The title of the book.
 * @param booksInventory A list of dictionaries containing information about the books in the library inventory.
 *                       Each dictionary represents a book and holds keys 'title' and 'available'.
 * @return True if the book is available, False otherwise.
 */
fun isBookAvailable(title: String, booksInventory: List<Map<String, Any>>): Boolean {

    for (book in booksInventory) {
        if (book["title"] == title) {
            return book["available"] as Boolean
        }
    }
    return false
}
/**
 * Given the title of a book and the inventory of books, this function checks whether the book is available or not.
 *
 * @param title The title of the book.
 * @param booksInventory A list of dictionaries containing information about the books in the library inventory.
 *                       Each dictionary represents a book and holds keys 'title' and 'available'.
 * @return True if the book is available, False otherwise.
 */
fun isBookAvailable(title: String, booksInventory: List<Map<String, Any>>): Boolean {
/**
 * Given the title of a book and the inventory of books, this function checks whether the book is available or not.
 *
 * @param title The title of the book.
 * @param booksInventory A list of dictionaries containing information about the books in the library inventory.
 *                       Each dictionary represents a book and holds keys 'title' and 'available'.
 * @return True if the book is available, False otherwise.
 */
fun isBookAvailable(title: String, booksInventory: List<Map<String, Any>>): Boolean {

    for (book in booksInventory) {
        if (book["title"] == title) {
            return book["available"] as Boolean
        }
    }
    return false
}