Vinod
Vinod
NAVODAYA VIDYALAYA
KOTABAGH , [NTL]
(SESSION-2023-2024 )
PROJECT WORK OF
COMPUTER SCIENCE
TOPIC-LIBRARY MANAGEMENT SYSTEM
Certificate
This is to that Ankit Budhlakoti of
class/section 12B, Rajeev Gandhi
Navodaya viyalaya Syat Kotabagh
Nainital, has successfully completed the
project entitled “library management
system” in computer science for the
AISSCE as prescribed by CBSE in the
academic year 2023-24. The project is
the result of his efforts & eneavours.
Date:
(Signature of the teacher)…………………
External Examinar Sign……………………
ACKNOWLEGEMEN
T
It is my privilege to express my most
sincere regards to all who directly or
indirectly helped me to complete my
project work.
I herby, acknowledge my heartiest
gratitude to my computer science
teacher Mr. Ramesh Chandra Sanwal
for his valuable inputs, encouragement,
whole-hearted cooperation that led me
all the way to accomplish this project
based on Library Management system.
I take this opportunity to thank
all my teachers, parents & guidance that
have been very helpful in various
phases of the completion of the project.
Source
code
LIBRARY MANAGEMENT SYSTEM
_________________________________________
#MAIN---
print("------------------------------------------WELCOME TO THE
LIBRARY----------------------------------------------------------------- ")
print()
Z= None
U=None
menu()
-----------------------------------------------------------------------------------------------------
#connectoins---
import mysql.connector as sqltor
mycon= sqltor.connect(host='localhost',user='root',passwd='111')
cursor=mycon.cursor()
cursor.execute("use library")
mycon.commit()
#functions---
def menu():
print("--> MENU:")
print(" 4.EXIT")
if X==1:
register()
elif X==2:
check()
elif X==3:
passwd()
elif X==4:
print()
while True:
break
else:
print("INVALID CHOICE--")
while True:
continue
def register():
check1(A)
mycon .commit()
print()
options()
def options():
print()
print(" 4. GO BACK")
print("")
print(book_check())
options()
elif choice==2:
print()
issue()
options()
elif choice==3:
book_return()
options()
elif choice==4:
menu()
else:
print("INVALID CHOICE--")
options()
def staff():
a='y'
while a=='y':
if choice1==1:
print()
book_check()
continue
elif choice1==2:
print()
addbook()
continue
elif choice1==3:
delete_record()
continue
elif choice1==4:
print(memb_list())
continue
elif choice1==5:
del_membrecord()
continue
elif choice1==6:
issue_record()
continue
elif choice1==7:
return_record()
continue
elif choice1==8:
del_issue_record()
continue
elif choice1==9:
del_return_record()
continue
elif choice1==10:
menu()
continue
else:
print("INVALID CHOICE--")
staff()
print()
a='x'
def passwd():
for i in range(0,3):
if paswd==123:
print()
staff()
break
else:
print("WRONG PASSWORD!!")
continue
print("_______________________________________________________")
menu()
def issue():
print()
A=check2()
d=cursor.fetchall()
k2=d[0]
x=k2[0]
t=cursor.fetchall()
k1=t[0]
v=k1[0]
i= date.today()
print()
print("BOOK_NAME :",v)
c=x-m
if x<m:
print()
else:
cursor.execute("insert into book_issue( MEMBER_ID, BOOK_ID, BOOK_NAME , ISSUE_DATE
,ISSUED_BOOK_QUANTITY )values({},{},'{}','{}',{})".format( A,h ,v,i,m))
mycon.commit()
def book_return():
print()
A=check2()
t=cursor.fetchall()
k1=t[0]
v=k1[0]
i= date.today()
d=cursor.fetchall()
k2=d[0]
x=k2[0]
c=x+f
mycon.commit()
else:
options()
def addbook():
a=int(input("Enter BOOK_ID:"))
b=input("Enter BOOK_NAME:")
c=input("Enter AUTHOR_NAME:")
d=int(input("Enter BOOK_COST:"))
mycon.commit()
def memb_list():
data=cursor.fetchall()
mycon.commit()
d=data
print()
print(' __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
__ ')
print('|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_|')
for i in d :
print('|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_|')
print()
def issue_record():
data=cursor.fetchall()
mycon.commit()
d=data
print('______________________________________________________________________
___________________________________ ')
print('|
___________________________________________________________________________
_____________________________|')
for i in d :
print('|
___________________________________________________________________________
_____________________________|')
def return_record():
data=cursor.fetchall()
mycon.commit()
d=data
print('______________________________________________________________________
___________________________________ ')
print('|
___________________________________________________________________________
_____________________________|')
for i in d :
print('|
___________________________________________________________________________
_____________________________|')
def book_check():
data=cursor.fetchall()
mycon.commit()
d=data
print('|
___________________________________________________________________________
__________________|')
for i in d :
print('|
___________________________________________________________________________
__________________|')
def delete_record():
mycon.commit()
def del_membrecord():
mycon.commit()
def del_return_record():
print("RETURN RECORD:")
return_record()
v=int(input("ENTER THE MEMBER'S_ID WHOSE RECORD YOU WANT TO DELETE :"))
mycon.commit()
def del_issue_record():
print("ISSUE RECORD:")
issue_record()
mycon.commit()
def check():
h=cursor.fetchall()
d=[]
for i in h:
for j in i:
d.append(j)
global Z
if Z in d :
print("ID MATCHED")
print("ENTERING_______")
options()
else:
print()
while True:
break
def check1(x):
h=list(cursor.fetchall())
global U
U=x
if x in h:
register()
else:
return
def check2():
if n==Z :
return n
elif n==U :
return n
else:
options()
OUTPUTS
My sql tables
Bibliography
1. Computer science with PYTHON
by Sumita Arora
2. NCERT website resources
3. www,w3school.com
4. www.python.prg
5. www.google.com