This is a guided practice notebook where you’ll build a flexible book filter using Python dictionaries, conditionals, string methods, and loops.
A program that:
- Prompts the user to input a starting letter.
- Filters and displays only books that start with that letter and are currently Available.
- Counts and displays the total number of matching books.
- Python dictionaries
- For loops
- Conditional statements
- String methods like
.startswith(),.upper(), and.strip() - User input handling
Once you’ve completed the basic functionality, try extending the project with these ideas:
- Let the user input multiple starting letters (e.g.,
T,S,M). - Allow the user to choose whether to filter by
"Available","Checked Out", or show all books. - Add functionality to insert new books into the library dictionary.
- Allow users to update the status of a book (e.g., from
"Checked Out"to"Available").
You can run this notebook in any environment that supports Jupyter Notebooks:
- Clone this repository.
- Open the
.ipynbfile in Jupyter Lab, Jupyter Notebook, or VS Code with the Jupyter extension. - Follow the instructions and fill in the missing code cells as you go.
- Add, commit, and push when you are finished.