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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started