COMPUTER SCIENCE
PROJECT
TOPIC NAME: LIBRARY MANAGEMENT
NAME: SOUMYA RASAL
CLASS: XII
ROLL NO:
Page 1 of 19
CERTIFICATE
This is to certify that the project entitled is authentic
work carried out under my supervision as part of the
CBSE curriculum of class XII COMPUTER and that it
is as per the guidelines issued by CBSE. To the best
of my knowledge, the project is original, and a
bonafide work undertaken by
Roll number:
Date
Internal examiner Signature:
Principal Signature:
Page 2 of 19
ACKNOWLEDGEMENT
I would like to express my deepest appreciation to all
those who provided me with the possibility to complete
this project. I would like to thank my Computer
teacher , whose valuable guidance has helped
me complete this project. His/ Her suggestions and
instructions have served as a major contributor toward
the completion of the project. I take this opportunity to
thank our head of the institution; Ms. who was
always supportive and helpful in fulfilling all our
academic requirements. Last but not least; I would like
to thank all my classmates who have helped me to
complete this project.
Page 3 of 19
TABLE OF CONTENTS
Sl No. Title Pg
No.
1. Aim 5
2. Introduction 6
3. Details 7
4. About System 8
5. Code 9
6. Output Screen Shots 16
7. Bibliography 19
Page 4 of 19
AIM
Today computers play a great role in various industries
and a large number of industries are using computers for
various applications such as maintaining cashbook, sales
book, purchase book and other books of accounts.
Computers can also be used for the designing of various
products. Computers provide many options for the
designing of products. This project on library
management will help to enhance the library features
And experience.
Page 5 of 19
INTRODUCTION
This project is based on python programming.
BENEFITS OF THIS PROGRAMME:
• Less Paper Work
• No Manual Work.
• Record of Library.
• Data Is Not Scattered
• User-friendly Software
• Flexibility
FEASIBILITY OF PROGRAM:
Economic feasibility:
The proposed system is economically feasible because
the benefits and the savings that are expected from
a candidate system outweigh the cost incurred
Page 6 of 19
Technical Feasibility:
The existing Hardware and Software facilities support the proposed
system. Computer and storage media are available and software can be
developed
Operational Feasibility:
As in the case of present system the entire work is being done manually.
So the data being scattered, information retrieval becomes difficult and
maintaining database is also very tedious. In case of proposed system,
entire work will be done automatically.
Page 7 of 19
ABOUT SYSTEM
HARDWARE SPECIFICATIONS:
The following is the hardware specification of the system on
which the software has been developed:-
Operating System : Windows 10/11
Machine Used : Pentium Dual Core Processor 2.6
GHz 2 GB RAM, 500 GB Hard Disk
SOFTWARE SPECIFICATIONS:
Front End Used: python
Backend Used : Data File
Page 8 of 19
CODE:
import os
import csv
def addrecord():
print("Add a new Record")
print("================")
f = open('Librarys.csv', 'a', newline='\r\n') s
= csv.writer(f)
rollno = int(input('Enter rollno='))
name = input('Enter name=')
marks = float(input('Enter marks='))
rec = [rollno, name, marks]
s.writerow(rec)
f.close()
print("Record Saved")
Page 9 of 19
input("Press any key to continue..")
def modifyrecord():
print("Modify a Record")
print("================")
r = input('Enter rollno you want to modify') f
= open('Librarys.csv', 'r', newline='\r\n')
f1 = open('temp.csv', 'w', newline='\r\n') s
= csv.reader(f)
s1 = csv.writer(f1)
for rec in s:
if rec[0] == r:
print("Rollno=", rec[0])
print("Name=", rec[1])
print("Marks=", rec[2])
choice = input("Do you want to modify this
record(y/n)")
if choice == 'y' or choice == 'Y':
rollno = int(input('Enter New rollno='))
Page 10 of 19
name = input('Enter new name=')
marks = float(input('Enter new marks=')) rec
= [rollno, name, marks] s1.writerow(rec)
print("Record Modified")
else:
s1.writerow(rec)
else:
s1.writerow(rec)
f.close()
f1.close()
os.remove("Librarys.csv")
os.rename("temp.csv", "Librarys.csv")
input("Press any key to continue..")
def deleterecord(): print("Delete
a Record")
print("================")
r = input('Enter rollno you want to delete') f
= open('Librarys.csv', 'r', newline='\r\n') f1
Page 11 of 19
= open('temp.csv', 'w', newline='\r\n')
s = csv.reader(f)
s1 = csv.writer(f1)
for rec in s:
if rec[0] == r:
print("Rollno=", rec[0])
print("Name=", rec[1])
print("Marks=", rec[2])
choice = input("Do you want to delete this
record(y/n)")
if choice == 'y' or choice == 'Y':
pass
print("Record Deleted") else:
s1.writerow(rec)
else:
s1.writerow(rec)
f.close()
f1.close()
os.remove("Librarys.csv")
os.rename("temp.csv", "Librarys.csv")
Page 12 of 19
input("Press any key to continue..")
def viewall():
print("List of All Records") print("===================")
f = open('Librarys.csv', 'r', newline='\r\n') s
= csv.reader(f)
i=1
for rec in s:
print(rec[0], end="\t\t") print(rec[1],
end="\t\t")
print(rec[2])
i += 1
f.close()
input("Press any key to continue..")
def search():
print("Search a Record")
print("===================")
r = input('Enter rollno you want to search') f
Page 13 of 19
= open('Librarys.csv', 'r', newline='\r\n')
s = csv.reader(f)
for rec in s:
if rec[0] == r:
print("Rollno=", rec[0])
print("Name=", rec[1])
print("Marks=", rec[2])
f.close()
input("Press any key to continue..")
def mainmenu():
choice = 0
while choice != 6:
print("\n") print("Main
Menu")
print("==========")
print("1. Add a new Record")
print("2. Modify Existing Record")
print("3. Delete Existing Record")
Page 14 of 19
print("4. Search a Record")
print("5. List all Records") print("6.
Exit")
choice = int(input('Enter your choice')) if
choice == 1:
addrecord()
elif choice == 2:
modifyrecord()
elif choice == 3:
deleterecord()
elif choice == 4:
search()
elif choice == 5:
viewall()
elif choice == 6:
print("Software Terminated")
break
mainmenu()
Page 15 of 19
OUTPUT SCREENSHOTS:
-------------------------------------------------------------------
Page 16 of 19
----------------------------------------------------------------------
Page 17 of 19
----------------------------------------------------------------------
Page 18 of 19
BIBLOGRAPHY:
1. SUMITA ARORA (CLASS 12)
2. www.google.com
3. www.pyhonsource.com
4. www.codeindia.com
Page 19 of 19