0% found this document useful (0 votes)
15 views

Functions-Case Study-Library Management System

Uploaded by

hiteshahire176
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Functions-Case Study-Library Management System

Uploaded by

hiteshahire176
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Python Functions Coding Assignment: Case Study on Library

Management System
Background

You are tasked with developing a simple Library Management System (LMS) using
Python. The system will help manage books in a library, allowing users to add, remove,
search for, and display books. The focus of this assignment is to use Python functions
to encapsulate the logic for each operation.

Objectives
1. Create a function to add a book to the library.
2. Create a function to remove a book from the library.
3. Create a function to search for a book by title.
4. Create a function to display all books in the library.
5. Create a function to count the total number of books in the library.

Requirements

1. Use a list to store the book information. Each book can be represented as a dictionary
containing:
 Title
 Author
 ISBN (International Standard Book Number)
 Year of Publication
2. Implement the following functions:
 add_book(books, title, author, isbn, year): Adds a new book to the library.
 remove_book(books, title): Removes a book by its title.
 search_book(books, title): Searches for a book by its title and returns the book
details if found.
 display_books(books): Displays all books in the library.
 count_books(books): Returns the total number of books in the library.

3. Create a simple menu-driven interface that allows users to perform the above
operations.
Submit the complete Python code file along with a brief report (1-2 paragraphs)
explaining your approach, any challenges you faced, and how you overcame them.
Evaluation Criteria
•Correctness of functions (50%) Code organization and readability (20%)
•User interface (20%) Documentation and report (10%)

You might also like