/**
 * This function takes a library and a book name as arguments and returns whether the book is available or not.
 * The function uses nested if statements and the simple assignment operator (=).
 */
fun findBook(library: List<String>?, bookName: String?): Boolean {

    var isAvailable = false

    // Check if library exists and contains any books
    if (!library.isNullOrEmpty()) {
        
        // Check if the bookName is provided
        if (!bookName.isNullOrBlank()) {
            
            // Iterate through each book in the library
            for (book in library) {
                
                // Check if the book name matches the provided bookName
                if (book == bookName) {
                    
                    // Assign true to the variable isAvailable if the book is found
                    isAvailable = true

                    // Break out of the loop as the book is found
                    break
                }
            }
        }
    }

    return isAvailable
}
/**
 * This function takes a library and a book name as arguments and returns whether the book is available or not.
 * The function uses nested if statements and the simple assignment operator (=).
 */
fun findBook(library: List<String>?, bookName: String?): Boolean {
/**
 * This function takes a library and a book name as arguments and returns whether the book is available or not.
 * The function uses nested if statements and the simple assignment operator (=).
 */
fun findBook(library: List<String>?, bookName: String?): Boolean {

    var isAvailable = false

    // Check if library exists and contains any books
    if (!library.isNullOrEmpty()) {
        
        // Check if the bookName is provided
        if (!bookName.isNullOrBlank()) {
            
            // Iterate through each book in the library
            for (book in library) {
                
                // Check if the book name matches the provided bookName
                if (book == bookName) {
                    
                    // Assign true to the variable isAvailable if the book is found
                    isAvailable = true

                    // Break out of the loop as the book is found
                    break
                }
            }
        }
    }

    return isAvailable
}