Question: # PROBLEM 7: Let's add mechanisms for checking books out of and into libraries. # Add the following method to the Library class: # -

# PROBLEM 7: Let's add mechanisms for checking books out of and into libraries. # Add the following method to the Library class: # - willAccept (accepts a Book instance as an argument ): Use isinstance to check if the book argument is a PaperBook instance. If it is, return True (you can check this using isinstance) if (and only if ) book. numTornPages is less than self . tornPageTolerance # If the book is NOT a PaperBook instance, return True
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
