Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

DAV PUBLIC SCHOOL, MCL

JAGANNATH AREA, DERA

COMPUTER SCIENCE INVESTIGATORY


PROJECT
AISSCE:2022-23
TOPIC:-“LIBRARY MANAGEMENT”

SUBMITTED BY:-
NAME:- ADITHYA S NAIR
ROLL NO:- 02
CLASS-XII SC. ‘A’
GUIDED BY:-
MR.RUPAK KUMAR SINGH
(HOD COMPUTER SCIENCE)
BONAFIED CERTIFICATE
THIS IS TO CERTIFY THAT MASTER ADITHYA S NAIR
OF CLASS ‘XII’ HA S UNDERTAKEN THE
THE COMPUTER INVESTIGATORY PROJECT
TITLED “LIBRARY MANAGEMENT”
SUCCESSFULLY UNDER THE GUIDANCE OF
OUR COMPUTER TEACHER RUPAK KU. SINGH
AS PER THE REQUIREMENT OF AISSCE-2022-
2023.

MR. RUPAK KU SINGH SUKLA CHAKRABORTY


(HOD COMPUTER DEPT.) (PRINCIPAL)
D.A.V PUBLIC SCHOOL D.A.V PUBLIC SCHOOL
MCL,J.A.,DERA MCL,J.A.,DERA

(SIGNATURE OF EXTERNAL)
ACKNOWLEDGEMENT
I ADITHYA S NAIR would like to convey my heartfelt
thanks to my Computer Science teacher Mr.
Rupak Kumar Singh, my parents and my friends
who always gave me valuable suggestions
during the project works.
I would also appreciate our Principal Madam
for her encouragement and advice. I am
extremely thankful to them for their co-
operation and guidance throughout the project.

Name: ADITHYA S NAIR


Class : XII Sc
RollNo Teacher’s Signature
CONTENTS

SL. NO TOPIC
1. GENERAL INFO.

2. INTRODUCTION

3. PROGRAM

4. BIBILOGRAPHY

5. TEACHER’S EVALUATION

REPORT
GENERAL INFORMATION

NAME OF THE PROJECT


THE LIBRARY MANAGEMENT

PREPARED BY
ADITHYA S NAIR

CLASS
XII SCIENCE

GUIDED BY
Mr. RUPAK KUMAR SINGH

SCHOOL
DAV PUBLIC SCHOOL
MCL, JA
(AT SENIOR COMPUTER LABORATORY)
INTRODUCTION
In today’s world computers have become common things
at every workplaces and have contributing its helpful and
fascinating abilities whether in airport, shops, banks,
offices etc. Computer enables people in these areas to
handle the data in a perfectly organized manner, provides
a computer based record keeping system, helps in security
and ease in modification and retrieval of data.

This project is on book library using python is completed


using python and files. The basic theory involved in this
project in the storing data and information in the form of a
table having fields and records. A file with the user defined
name is created and used for writing on it or reading from
it.

Here, we have used three file named book.dat,


member.dat, lib.dat having information about the books,
members and the processing in the library respectively.
Firstly a main menu is being displayed again and again
until the user wants and opts for the exits. The main menu
has option to add books to add member, delete member
and to exit. There are files in this program which is being
handled, which is being easily done by using file handling.
PROGRAM
import os

from datetime import*

import pickle

def introduction():

print("Hello Sir, welcome to our library.")

print("You can become a member of our Library and can enjoy by reading different books. ")

print("You can issue max of 1 book in your name at the rate of Rs.100. ")

print("***ALERT***")

print("if you return the book after due date, then a charge of Rs.10 will increase per day")

print("*****************************************************")

def add_new_book():

f=open("books.dat","ab")

res=[]

while True:

bname=input("Enter the name of the new book to be added:")

author=input("Enter the name of the author:")

price=int(input("Enter the price of the book in inr:"))

copies=int(input("Enter the total number of copies:"))

data=[bname,author,price,copies]

res.append(data)

ch=input("do you want to add more books (Y/N):")

if ch=="N" or ch=="n":

break

pickle.dump(res,f)

print("***New Book details entered***")

print("*****************************************************")
f.close()

def add_new_member():

f=open("members.dat","ab")

rec=[]

for i in range(1):

names=input("Enter the name of new member:")

adress=input("Enter the address:")

city=input("Enter the name of city:")

district=input("Enter the district:")

loc=[name,address,city,district]

rec.append(loc)

pickle.dump(rec,f)

print("Congratulations! You are now a member of our library")

print("*****************************************************")

f.close()

def issue_book(curdt,rtrndt):

srch=("Enter the name of the book you want to issue:")

f=open("books.dat","rb")

rec=[]

try:

while True:

r=pickle.load(f)

for i in r:

rec.append(i)

except EOFError:

break

f.close()
f1=open("issuedbook.dat", "ab")

f2=open("books.dat", "wb")

c=0

for j in rec:

if j[0]==srch:

nme=input("Enter the name of the person who wants to issue the book.")

data[srch,nme.j]

pickle.dump(data,f1)

print(nme, "has issued the book",srch, "on",curdt, "and should return the book before",rtrndt)

print("*****************************************************")

c=c+1

continue

pickle.dump(j,f2)

if c==0:

print("Book not found")

f2.close()

f1.close()

def return_book(rtrndt):

crdt=date.today()

f=open("issuedbook.dat","rb+")

res=[]

try:

while True:

k=pickle.load(f)

res.append(k)

except EOFError:

break
f1=open('books.dat', 'ab')

bsrch=input('Enter the name of the book which is to be returned:')

isnme=input('Enter the name of the person who have issued the book:')

for i in res:

if i[0]==bsrch:

if crdt<=rtrndt:

pickle.dump(i[2],f1)

print(i[1],'have to pay Rs.100 to the Library')

print('*****************************************************')

continue

else:

pickle.dump(i[2],f1)

ex_dys=(crdt-rtrndt).days

print(i[1],'have to pay Rs.',100+(10*ex_dys), 'to the library')

print('*****************************************************')

continue

pickle.dump(i,f)

f.close()

def list_of_books():

f=open("books.dat","rb")

rec=[]

try:

while True:

r=pickle.load(f)

rec.append(r)

except EOFError:

break
for j in rec:

print(j)

f.close()

def list_of_members():

f=open('Members.dat','rb')

rec=[]

try:

while True:

r=pickle.load(f)

rec.append(r)

except EOFError:

break

for i in rec:

print(i)

f.close()

introduction()

print("1.ADD NEW BOOK")

print("2.ADD NEW MEMBERS")

print("3.ISSUE BOOK")

print("4.RETURN BOOK")

print("5.LIST OF BOOKS")

print("6.LIST OF MEMBERS")

print("7.EXIT")

curdt=date.today()

rtrndt-curdt+timedelta(days=30)
while True:

ch=int(input("Enter your choice from 1 to 7:"))

if ch==1:

add_new_book()

elif ch==2:

add_new_member()

elif ch==3:

issue_book(rtrndt)

elif ch==4:

return_book(rtrndt)

elif ch==5:

list_of_books()

elif ch==6:

list_of_members()

elif ch==7:

break

else:

print("Invalid choice")
OUTPUT
Hello Sir, welcome to our Library

You can become a member of our Library and can enjoy by reading different books

You can issue max of 1 book in your name at the rate of Rs.25.

***ALERT***

If you return the book after due date, then a charge of Rs. 10 will be increasing on your
returning amount

1.ADD NEW BOOK

2.ADD NEW MEMBER

3.ISSUE BOOK

4.RETURN BOOK

5.LIST OF BOOKS

6.LIST OF MEMBERS

7.EXIT

Enter your choice from 1 to 7:1

Enter the name of the new book to be added CSW Python

Enter the name of the author Sumita Arora

Enter the price of the book in inr:600

Enter the total number of copies 10000

Do you want to add more books (Y/N):y

Enter the name of the new book to be added:Together With

Enter the name of the author: ‘Rachna Sagar’

Enter the price of the book in inr:400

Enter the total number of copies:100000

Do you want to add more books (Y/N):y

Enter the name of the new book to be added RD Sharma


Enter the name of the author:Ramesh Dayanand Sharma.

Enter the price of the book in inr:1200

Enter the total number of copies:200000

Do you want add more books (Y/N):n

***New Book details entered***

*****************************************************

Enter your choice from 1 to 7:3

Enter the name of the book you want to issue:RD Sharma

Enter the name of the person who wants to issue the book:Pooja

Pooja has issued the book RD Sharma on 2021-03-21 and should return the book before
2021-04-20

*****************************************************

Enter your choice from 1 to 7:4

Enter the name of the book which is to be returned:RD Sharma

Enter the name of the person who have issued the book:Pooja

Pooja have to pay Rs.100 to the Library

*****************************************************

Enter your choice from 1 to 7:5.

['CSW Python', 'Sumita Arora', 600, 10000]

['Together With', 'Rachna Sagar', 400, 100000]

['RD Sharma', 'Ramesh Dayanand Sharma', 1200, 200000]

Enter your choice from 1 to 7:6

[['Ramesh', 'Dera', 'Talcher', 'Angul"]]

[['Rahul', 'Balanda', 'BBSR', 'BBSR']]

Enter your choice from 1 to 7:7


BIBLIOGRAPHY

THE ABOVE INFORMATION HAS BEEN DERIVED FROM


THE FOLLOWING SOURCES
• COMPUTER SCIENCE WITH PYTHON(SUMITA
ARORA)
• COMPUTER SCIENCE WITH PYTHON(PREETI
ARORA)
• COMPUTER SCIENCE WITH PYTHON(PRITI ARORA)

• WWW.GOOGLE.COM
• WWW.WIKIPEDIA.COM
• WWW.YOUTUBE.COM
TEACHER’S EVALUTION REPORT

NAME:-
ADITHYA S NAIR

CLASS:-
XII’SCIENCE’

ROLL NO:-
02

NAME OF THE SCHOOL:-


DAV PUBLIC SCHOOL, MCL, JA, TALCHER

MARKS AWARDED

REMARKS

SIGNATURE OF INTERNAL SIGNATURE OF EXTERNAL


PROJECT REPORT

I am submitting my project report in computer for


AISSCExamination on the topic

“THE LIBRARY MANAGEMENT”

AS PARTIAL FULFILMENT OF AISSCE FOR SESSION


2022-23

THIS PROJECT HAS GIVEN ME THE OPPORTUNITY OF


GOING THROUGH THE VARIOUS BOOKS FOR
COLLECTION INFORMATION AS WELL AS HAS
BENEFITTED ME A LOT.

You might also like