Question: IN PYTHON: Create a class named Library. Every instance of Library should have two instance variables: books (set it to an empty list initially) tornPageTolerance

IN PYTHON:

Create a class named Library. Every instance of Library should have two instance variables: books (set it to an empty list initially) tornPageTolerance (set it to 10 initially) The constructor for Library SHOULD NOT take any arguments (besides self).

Define the following methods in your Library class above:

addBook (should accept an instance of Book):

Add the provided Book to self.books; does not return anything

findBooksBy (should accept a string representing an author):

Return a list of every item in self.books where the author argument equals the book's author. These books should be in the same order in which they were added.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!