Library Book Manager App
Imagine you’re designing an app for a small library to manage its collection of books. Library staff need to organize books, update the catalog, and keep track of the inventory. Your app will allow users to add, remove, and update book details while tracking the total number of books in the library.
Scenario
The library staff wants a simple and interactive way to manage their books. They need to:
- Add new books to the collection.
- Insert books into specific positions in the catalog.
- Count the total number of books.
- Check how many copies of a specific book exist.
- Replace book titles when corrections or updates are needed.
- View the full list of books.
Your app will implement all these features dynamically using Python.
Instructions
1. Initialize the Catalog
- Start with a predefined list of books or allow the user to input the initial catalog.
2. Provide Management Features
- The app should allow the user to perform the following:
- Add a new book to the catalog.
- Insert a book at a specific position.
- Count the total number of books.
- Count occurrences of a specific book.
- Replace a book with a new title.
- Display the catalog.
3. Use a For Loop
- Use a
for
loop to repeatedly display the menu and process the user’s choices until they choose to exit.
4. Provide a Summary
- At the end of the session, display the updated catalog and total number of books.