Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Pranjal

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

THE JAIN INTERNATIONAL SCHOOL, KANPUR

(2023-25)

COMPUTER
SCIENCE(08
3)
SUb

PROJECT FILE
Submitted by : Pranjal Srivastava
Class : XII S4
ACKNOWLEDGEMENT

First and foremost, I am grateful to my instructor, Jyoti Ma’am, for providing


valuable guidance and feedback. Your insights and encouragement were
instrumental in shaping this project.

I would also like to thank my classmates and friends for their support and
inspiration. Your encouragement helped me stay motivated and focused
during the project.

Lastly, I am appreciative of the resources provided by the THE JAIN


INTERNATIONAL SCHOOL library and online databases, which were crucial for
my research and development.
Thank you all for your support and understanding.

Sincerely,
Pranjal Srivastava
ABOUT THE PROJECT
Project Title: Library Management System

Project Overview:
The Library Management System (LMS) project is designed to enhance the efficiency and
effectiveness of managing a library’s resources and operations. This system aims to simplify and
automate key processes, making library management more streamlined and user-friendly for both
librarians and patrons.

Objectives:

1. Catalog Management: Organize and maintain an extensive database of books, including


details such as title, author, genre, ISBN, and availability status. This feature helps in easy
retrieval and management of library resources.

2. Member Management: Manage library memberships by maintaining a database of


members, including personal details, membership status, and borrowing history. This helps in
tracking member activities and providing personalized services.

3. Book Lending and Return: Facilitate the borrowing and returning of books by tracking due
dates, overdue fines, and book availability. This feature aims to ensure an efficient check-out
and return process, reducing manual errors and improving service speed.

4. Reservation System: Allow members to reserve books that are currently checked out or in
high demand. This feature helps in managing book availability and meeting the needs of
library users.

5. Reporting and Analytics: Generate reports on various aspects of library operations, such as
book circulation statistics, member activity, and overdue items. These insights are useful for
library management and decision-making.
CODEBASE
books = ["vistas", "hcv", "rd-sharma", "flamingo", "sameer-bansal", "cengage"]
track = []

def displayAvailableBooks():

"""Display the list of available books."""


print(f"\n{len(books)} AVAILABLE BOOKS ARE: ")

for book in books:


print(" ♦-- " + book)
print("\n")

def borrowBook(name, bookname):

"""Handle the borrowing of a book."""


if bookname not in books:
print(f"{bookname} BOOK IS NOT AVAILABLE EITHER TAKEN BY SOMEONE ELSE, WAIT
UNTIL HE RETURNED.\n")

else:
track.append({name: bookname})
print("BOOK ISSUED : THANK YOU KEEP IT WITH CARE AND RETURN ON TIME.\n")

books.remove(bookname)

def returnBook(bookname):

"""Handle the return of a book."""


print("BOOK RETURNED : THANK YOU! \n")

books.append(bookname)

def donateBook(bookname):

"""Handle the donation of a book."""


print("BOOK DONATED : THANK YOU VERY MUCH, HAVE A GREAT DAY AHEAD.\n")

books.append(bookname)

def requestBook():

"""Request a book from the user."""


print("So, you want to borrow a book!")

book = input("Enter name of the book you want to borrow: ")


return book

def returnBookRequest():

"""Request return details from the user."""


print("So, you want to return a book!")

name = input("Enter your name: ")


book = input("Enter name of the book you want to return: ")

if {name: book} in track:


track.remove({name: book})
return book

def donateBookRequest():

"""Request book donation details from the user."""


print("Okay! you want to donate a book!")

book = input("Enter name of the book you want to donate: ")


return book

def trackBooks():

"""Display the list of issued books and their holders."""


for entry in track:
for key, value in entry.items():
holder = key
book = value
print(f"{book} book is taken/issued by {holder}.")

print("\n")

if len(track) == 0:
print("NO BOOKS ARE ISSUED!. \n")

def main():

"""Main function to run the library management system."""

print("\t\t\t\t\t\t\t♦♦♦♦♦♦♦ WELCOME TO THE TJIS LIBRARY ♦♦♦♦♦♦♦\n")


print("""CHOOSE WHAT YOU WANT TO DO:-\n1. Listing all books\n2. Borrow books\n3.
Return books\n4. Donate books\n5. Track books\n6. Exit the library\n""")

while True:
try:
usr_response = int(input("Enter your choice: "))

if usr_response == 1: # listing
displayAvailableBooks()

elif usr_response == 2: # borrow


borrowBook(input("Enter your name: "), requestBook())

elif usr_response == 3: # return


returnBook(returnBookRequest())

elif usr_response == 4: # donate


donateBook(donateBookRequest())

elif usr_response == 5: # track


trackBooks()

elif usr_response == 6: # exit


print("THANK YOU! \n")
break

else:
print("INVALID INPUT! \n")
except Exception as e: # catch errors
print(f"{e} ---> INVALID INPUT! \n")

if __name__ == "__main__":
main()
OUTPUT
BIBLIOGRAPHY

 Programming Languages: Python


 Books Referenced : Preeti Arora
THANK YOU

You might also like