Question: Please help in doing only the below functions for the bookstore management system in python code 1- Add a new book. Write a function called

Please help in doing only the below functions for the bookstore management system in python code

1- Add a new book. Write a function called add_book() that asks the user to input data of a new book and then add the data to the books file, separating the fields with the same | character. The function should make sure that the books ISBN number is not already in the stock. 2- Update stock level. Write a function called update_book() that takes as parameter the ISBN of the book to be updated. If the ISBN is found in the file, the function prompts the user to enter the copies (i.e. number of copies) to be added/removed. It should check that enough books are available if the operation is a remove operation. 3- Delete a book. Write a function called delete_book() that takes as parameter the ISBN of the book to be deleted. 4- A function to list the current stock in a nice tabular format. Monetary values should be shown to the nearest 2 decimal positions. In the last column of this table show the total price of the copies of each book (i.e. price*copies). 5- A function to display all the details of a given book, searched by ISBN. The ISBN should be entered as an argument to the function. 6- A function to produce a list of all books by a given publisher. Publisher name should be entered as an argument to the function. 7- A function to produce a list of all books by a given author. Author name should be entered as an argument to the function. The function should find the books even if the entered author name partially matches the stored author name.

8- A function to produce a list of all the books whose price is greater than the average book price. 9- A function to produce stock statistics such as: the current value of the stock (sum of price*copies), the average book price, the most expensive book, the least expensive book, the least stocked book, the oldest book(s), and the latest book(s).

the final will be as follow:

[1] Add book details

[2] Update a book

[3] Delete a book

[4] List stoked books

[5] Find a book by ISBN

[6] Find books by a given publisher

[7] Find books by a given author

[8] Books above the average price

[9] Stock statistics

[0] Exit

Enter your choice: 1

Bookstore Information System Add book details:

================================================

Enter the ISBN : 978-0-05-042998-2

Enter the title: Java Programming for Engineers

Enter author name: Dietel R

Enter number of copies: 15

Enter year: 2020

Enter publisher name: QU Press

Enter the price: 210

.....Record 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!