0% found this document useful (0 votes)
33 views30 pages

Archana Ip Project Word File 11

Uploaded by

PVPS Coding
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)
33 views30 pages

Archana Ip Project Word File 11

Uploaded by

PVPS Coding
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/ 30

INFORMATICS PRACTICES

PROJECT REPORT
ON

LIBRARY MANAGEMENT SYSTEM


(Submitted in partial fulfilment for the requirement of
CBSE Class XII Commerce)

: Archana M
: XII COMMERCE
CERTIFICATE

This is to certify that the project work entitled ‘Library Management System’ is a
bonafide record of the original work done by ‘Archana M’ in partial fulfilment of the
requirements for the award of Senior Secondary Central Board of is Secondary Education.
We also certify that the work is original and has been completed and has been completed the
period 2024-2025.

Mrs. Sreedevi Menon Anup K

Principal Internal Guide

Peevees Public School Peevees Public School

Nilambur Nilambur

External Examiner Internal Examiner


DECLARATION

I hereby declare that this project work entitled ‘Library Management System’ submitted to
Central Board of Secondary Education, in partial fulfilment of the requirements for the
award of Senior Secondary Project is a record of original work done by me during the
period of study at Peevees Public School, Nilambur under the supervision and guidance of
Anup K.

Archana M

Reg No:

Place: Nilambur
Date:
ACKNOWLEDGEMENT

I take this opportunity to express my heartiest gratitude to all, whose contribution in this
project work can never beforgotten. First of all I thank God almighty who has been ineffable
source of strength, wisdom and inspiration for Completion of this project.

I would like to express our deep sense of gratitude to Mr.Anup K, PGT Computer Science,
who is a constant source of inspiration and whose guidance helped me in completing the
project successfully.

I am extremely grateful to my beloved teachers, especially Mrs.Sreedevi Menon, our


Principal, for her effort and numerous suggestions and also for her kind co-operation
throughout this project.

Last but not the least I would like to thank my beloved parents and friends who showered up
on me love and believed in our ability.

Once again I thank to all who has helped me directly and indirectly for the successful
completion of the project work
CONTENTS

 Introduction
 Aim of the project
 Source Codes
 Output
 Conclusion
 Bibliography
INTRODUCTION
Python is a widely used general purpose, High level Programming language.
It was created by Guido Vanrossum in 1991 and further developed by the Python
software foundation it was designed with the emphasis on code readability, and its
syntax allows programmers to express their concepts in fewer lines of codes it lets you
work quickly and integrate system more efficiently.
The project also uses the feature CSV as the back-end support, CSV files are plain-text
files, making them easier for the website developer to create. Since they're plain text,
they're easier to import into a spreadsheet or another storage database, regardless of
the specific software you're using. To better organize large amounts of data.
A Library Management System (LMS) project in Python aims to develop a software
application that aids in the management of various library functions. The project's goal is
to automate and simplify tasks related to book - keeping, user interaction, and record-
keeping, thereby increasing efficiency
The concept of Matplotlib is also used in the project for data visualization according to
the data fetched from the csv database files to show the statistical differences between
the teams. Data visualization is about communicating and presenting information that
can then be used for decision making.
PROBLEM DEFINITION & ANALYSIS
The hardest part of building a software system is deciding precisely what to build. No other
part of the conceptual work is so difficult as establishing the detailed technical requirement.
Defining and applying good, complete requirements are hard to work, and success in this
endeavor has eluded many of us. Yet, we continue to make progress.

Problem definition describes the system, not how. The quality of a software product is only
as good as the process that creates it. Problem definition is one of the most crucial steps in
this creation process. Without defining a problem, developers do not know what to build,
customers do not know what to expect, and there is no way to validate that the built system
satisfies the requirement.
Problem definition and Analysis is the activity that encompasses learning about the problem
to be solved, understanding the needs of customer and users, trying to find out who the user
really is, and understanding all the constraints on the solution. It includes all activities related
to the following:
 Identification and documentation of user’s needs.
 Creation of a document that describes the external behavior and the
association constraints that will satisfies those needs.
 Analysis and validation of the requirements documents to ensure consistency,
completeness, and feasibility
 Evolution of needs.
 The proposed system should maintain all the records, and should generate the required
reports and information when required.
 To provide efficient and secured Information storage, flow and retrieval system, ensuring
the integrity and validity of records.
 To provide graphical and user-friendly interface to interact with a centralized database
based on client-server architecture.
 To identify the critical operation procedure and possibilities of simplification using
modern IT tools and practices.
SOFTWARE SPECIFICATION:

Operating System : Windows 7 and


above Platform : Python IDLE 3.7
Database : CSV
Languages : Python

HARDWARE SPECIFICATION:

Processor : Dual Core and


above Hard Disk : 40 GB
Ram : 1024 MB

Aim:
To create a python program to perform the function furnished with:
 To develop a menu driven project showing the details of Library Management System and
information of using the concept of function
 To create different csv file to store the needed details of the regarding with each of the
team participating in the tournament.
 To fetch data from the csv files to the pandas program.
 To display the information’s regarding with the books and students list.
 To display the data’s using the concept of data visualization according to the data
fetched from the csv files (output of the program).
SOURCE CODE
import pandas as pd
from datetime import datetime, timedelta

# Define the file paths


students_file_path = 'D:\\LibraryMgt\\new_students1.csv'
books_file_path = 'D:\\LibraryMgt\\new_books1.csv'

# Load CSV files or initialize empty data


try:
students_df = pd.read_csv(students_file_path)
except FileNotFoundError:
students_df = pd.DataFrame(columns=['Student Name', 'Grade', 'Admission
No', 'Book Name', 'Issue Date', 'Return Date', 'Remarks'])

try:
books_df = pd.read_csv(books_file_path)
except FileNotFoundError:
books_df = pd.DataFrame(columns=['Book ID', 'Book Name', 'Author',
'Publication', 'Year', 'Status'])
books_df['Status'] = 'Available' # Initialize all books as available

# Save data back to CSV


def save_data():
global students_df, books_df
students_df.to_csv(students_file_path, index=False)
books_df.to_csv(books_file_path, index=False)

# Add a new student


def add_student():
global students_df
student_name = input("Enter Student Name: ")
grade = input("Enter Grade: ")
admission_no = input("Enter Admission Number: ")
students_df.loc[len(students_df)] = [student_name, grade, admission_no, '', '',
'', '']
save_data()
print("Student added successfully!")

# Add a new book to the library


def add_book():
global books_df
book_id = input("Enter Book ID: ")
book_name = input("Enter Book Name: ")
author = input("Enter Author Name: ")
publication = input("Enter Publication: ")
year = input("Enter Year of Publication: ")
books_df.loc[len(books_df)] = [book_id, book_name, author, publication,
year, 'Available']
save_data()
print("Book added successfully!")

# Delete a book
def
delete_book():
global books_df
book_name = input("Enter Book Name to delete: ")
if book_name in books_df['Book Name'].values:
books_df.drop(books_df[books_df['Book Name'] == book_name].index,
inplace=True)
save_data()
print("Book deleted successfully!")
else:
print("Book not

found!") # Search for a book


by name
def search_book():
global books_df
book_name = input("Enter Book Name to search: ")
results = books_df[books_df['Book Name'].str.contains(book_name,
case=False, na=False)]
if not results.empty:
print("Search
Results:")
print(results[['Book ID', 'Book Name', 'Author', 'Publication', 'Year',
'Status']])
else:
print("No books found with that name.")

import pandas as pd
from datetime import datetime, timedelta

# Define the file paths


students_file_path = 'D:\\LibraryMgt\\new_students1.csv'
books_file_path = 'D:\\LibraryMgt\\new_books1.csv'

# Load CSV files or initialize empty data


try:
students_df = pd.read_csv(students_file_path)
except FileNotFoundError:
students_df = pd.DataFrame(columns=['Student Name', 'Grade', 'Admission
No', 'Book Name', 'Issue Date', 'Return Date', 'Remarks'])

try:
books_df = pd.read_csv(books_file_path)
except FileNotFoundError:
books_df = pd.DataFrame(columns=['Book ID', 'Book Name', 'Author',
'Publication', 'Year', 'Status'])
books_df['Status'] = 'Available' # Initialize all books as available
# Save data back to CSV
def save_data():
global students_df, books_df
students_df.to_csv(students_file_path, index=False)
books_df.to_csv(books_file_path, index=False)

# Add a new student


def add_student():
global students_df
student_name = input("Enter Student Name: ")
grade = input("Enter Grade: ")
admission_no = input("Enter Admission Number: ")
students_df.loc[len(students_df)] = [student_name, grade, admission_no, '', '',
'', '']
save_data()
print("Student added successfully!")

# Add a new book to the library


def add_book():
global books_df
book_id = input("Enter Book ID: ")
book_name = input("Enter Book Name: ")
author = input("Enter Author Name: ")
publication = input("Enter Publication: ")
year = input("Enter Year of Publication: ")
books_df.loc[len(books_df)] = [book_id, book_name, author, publication,
year, 'Available']
save_data()
print("Book added successfully!")

# Delete a book
def
delete_book():
global books_df
book_name = input("Enter Book Name to delete: ")
if book_name in books_df['Book Name'].values:
books_df.drop(books_df[books_df['Book Name'] == book_name].index,
inplace=True)
save_data()
# Issue a book to a student
def issue_book():
global students_df, books_df
admission_no = input("Enter Admission Number of the Student: ")

student = students_df[students_df['Admission No'] == admission_no]


if student.empty:
print("Student not
found!") return

search_book() # Search for a book before issuing

book_name = input("Enter Book Name to issue: ")


book = books_df[books_df['Book Name'].str.contains(book_name,
case=False)]

if not book.empty and book.iloc[0]['Status'] == 'Available':


issue_date = datetime.now().strftime("%Y-%m-%d")
return_date = (datetime.now() + timedelta(days=14)).strftime("%Y-%m-
%d") # Default return date set to 14 days later
students_df.loc[students_df['Admission No'] == admission_no, 'Book
Name'] = book.iloc[0]['Book Name']
students_df.loc[students_df['Admission No'] == admission_no, 'Issue Date']
= issue_date
students_df.loc[students_df['Admission No'] == admission_no, 'Return
Date'] = return_date
books_df.loc[books_df['Book Name'] == book.iloc[0]['Book Name'],
'Status'] = 'Issued'
save_data()
print(f"Book '{book.iloc[0]['Book Name']}' issued successfully to
{student.iloc[0]['Student Name']}!")
else:
print("Book not available or not found.")

# Return a book from a


student def return_book():
global students_df, books_df
admission_no = input("Enter Admission Number of the Student: ")

student = students_df[students_df['Admission No'] == admission_no]


if student.empty:
print("Student not
found!") return

book_name = student.iloc[0]['Book Name']


if book_name:
students_df.loc[students_df['Admission No'] == admission_no, 'Book
Name'] = ''
students_df.loc[students_df['Admission No'] == admission_no, 'Issue Date']
= ''
students_df.loc[students_df['Admission No'] == admission_no, 'Return
Date'] = ''
books_df.loc[books_df['Book Name'] == book_name, 'Status'] = 'Available'
save_data()
print(f"Book '{book_name}' returned successfully by
{student.iloc[0]['Student Name']}!")
else:
print("No book issued to this student.")

# Search for a student


def search_student():
global students_df
admission_no = input("Enter Admission Number to search: ")
student = students_df[students_df['Admission No'] ==
admission_no] if not student.empty:
print("Student
Details:") print(student)
else:
print("Student not found!")

# Renew a book
def
renew_book():
global students_df
admission_no = input("Enter Admission Number of the Student: ")

student = students_df[students_df['Admission No'] == admission_no]


if student.empty:
print("Student not
found!") return

if student.iloc[0]['Book Name']:
issue_date = datetime.strptime(student.iloc[0]['Issue Date'], "%Y-%m-%d")
return_date = issue_date + timedelta(days=14) # Extend return date by 14
days
students_df.loc[students_df['Admission No'] == admission_no, 'Return
Date'] = return_date.strftime("%Y-%m-%d")
save_data()
print("Book renewed
successfully!") else:
print("No book issued to this student.")

def delete_student():
global
students_df
admission_no = input("Enter Admission Number to delete student: ").strip()
# Ensure the Admission No is treated as a string for comparison
students_df['Admission No'] = students_df['Admission No'].astype(str)
# Check if the admission number exists
if admission_no in students_df['Admission No'].values:
# Display the record before deletion (for debugging)
print("Record to be deleted:")
print(students_df[students_df['Admission No'] == admission_no])

# Drop the record


students_df = students_df[students_df['Admission No'] != admission_no]

# Save the updated DataFrame to the file


save_data()

# Confirm deletion
print(f"Student with Admission No {admission_no} deleted successfully!")
else:
print("Student not found!")

# Generate class-wise report with student details


def class_wise_report():
global students_df
if students_df.empty:
print("No student records available.")
return

# Group by 'Grade' and iterate over each group to display details


grouped = students_df.groupby('Grade')

print("Class-wise Report with Student Details:\n")


for grade, group in grouped:
print(f"Grade: {grade} (Total Books Issued: {len(group)})")
print(group[['Student Name', 'Admission No', 'Book Name', 'Issue Date',
'Return Date', 'Remarks']])
print("-" * 50)

# View all books


def view_all_books():
global books_df
if books_df.empty:
print("No books available.")
else:
print("All Books:")
print(books_df)

def view_all_students():
global students_df

# Reload data from the file to ensure we reflect the latest changes
try:
students_df = pd.read_csv(students_file_path)
except FileNotFoundError:
students_df = pd.DataFrame(columns=['Student Name', 'Grade', 'Admission
No', 'Book Name', 'Issue Date', 'Return Date', 'Remarks'])

# Display the student


data if
students_df.empty:
print("No students available.")
else:
print("All
Students:")
print(students_df)

# Main menu
def main_menu():
while True:
print("\n Peevees Library Management System")
print("1. Add Student")
print("2. Add Book")
print("3. Delete Book")
print("4. Issue Book")
print("5. Return Book")
print("6. Search
Student") print("7.
Renew Book")
print("8. Delete Student Details")
print("9. Class-Wise Report")
print("10. View All Books")
print("11. Search Book by
Name") print("12. View All
Students") print("13. Exit")

choice = input("Enter your choice: ")

if choice == '1':
add_student()
elif choice == '2':
add_book()
elif choice ==
'3': delete_book()
elif choice ==
'4': issue_book()
elif choice == '5':
return_book()
elif choice == '6':
search_student()
elif choice == '7':
renew_book()
elif choice == '8':
delete_student()
elif choice == '9':
class_wise_report()
elif choice == '10':
view_all_books()
elif choice == '11':
search_book()
elif choice == '12':
view_all_students()
elif choice == '13':
print("Exiting the Library Management System. Goodbye!")
break

# Run the program


main_menu()
OUTPUT:
CONCLUSION:

The project Library Management System was implemented by using python pandas with
the help of function and the concept of data visualization features using Matplotlib. It
helped me to arrange the data given by the user in an ordered manner and can be used to
view and edit at any time without any complication.

The project Library Management System mainly holds major 4 modules in which the first
implies the displaying all the contents of the csv files to the python pandas and the remaining
modules conveys the concept of data visualization with help of knowing the importance of
data visualization in the field of data sciences and also the concept of menu driven
programming and functions really helped in fulfilling our project. This project’s programme
was developed with the motive of quickening and easing the data visualization of in
formations. This will help in saving time and energy.
BIBLIOGRAPHY

 google.com
 learn Python.org
 docs.Python.org
 Python.org
 Real Python.com

BOOKS
 INFORMATICS PRACTICES +2,PREETHI ARORA
 INFORMATICS PRACTICES REFERNCES, SUMITHA ARORA ES REFERNCES,
SUMITHA ARORA

YEAR: 2024-25 Submitted by


NAME: ARCHANA M
GRADE: XII C
REGISTER NO:

You might also like