SlideShare a Scribd company logo
6
Most read
10
Most read
18
Most read
TOPIC:LIBRARY MANAGEMENT PROJECT
CBSE ROLL NO. : ………………………………..
SESSION : 2020-21
INFORMATICS PRACTICES
(Python)
CLASS 12th
SUBMITTED BY:ANKIT RAWAT
SUBMITTED TO: CBSE,
Under The Supervision OfMr. SURESH KUMAR
GOOD SAMARITAN SCHOOL, JASOLA
ALL INDIA SENIOR SCHOOL CERTIFICATE EXAMINATION
CERTIFICATE
Thisis to certify thatMaster
ANKIT RAWAT studying in
GOOD SAMARITAN SCHOOL of
standard 12th
Bhas completed
INFORMATICSPRACTICES
(python)project
Mrs. INDU PRASAD
(PRINCIPAL)
I express my deep gratitude and appreciation to those who agreed in
this project, for their time expended and courage in sharing their
insights with a fledging student. It is to them that I am most
indebted, and I can only hope that the product of our collaboration
benefits each one as much as I benefited from the process.
I had been immeasurably enriched by working under the supervision
of Mr. Suresh kumar the subject (INFORMATICS PRACTICES)
teacher, who has a great level of knowledge and who has an art of
encouraging , correcting and directing me in every situation possible,
which has enabled me to complete the project.
At times, my studies carried out at great coat to those closest to me.
I thank my family and my fellow students for their best
understanding and support.
I acknowledge to all the people who have involved and supported me
in making this project.
Withthanks…
ACKNOWLEDGEMENT
ANKITRAWAT
12TH
B
MYSELF,ANKIT RAWAT FEELING SO THANKFUL
TO OUR HOUNERABLE
PRINCIPALMAMMRS.INDU PRASAD
WHO ENCOURAGED US TO FACE PROBLEM
ANALYTICALLY AND MY WORTHY INFORMATICS
PRACTICES TEACHER Mr. SURESH SIRWHO
INSPIRED US AND ACKNOWLEDGE US ALL THE
VALUABLE SUGGESTION FOR IMPROVEMENT
OF PROJECT . I’M ALSO WANTS TO THANKS A
LOT TO CBSE WHICH PROVIDES US A BIG
GOLDENOPPORTUNITY BY WHICH WE GET
SOME PRACTICAL KNOWLEDGE OF DAY TO DAY
TO WORKING
THANKS
LIBRARY MANAGEMENTSOURCE CODE
LIBRARYMANAGEMENT
Coding:-1
import Return
import ListSplit
import dt
import Borrow
def start():
while(True):
print("Welcome to the library management system")
print("--------------------------------------------------------------------------------
-------------------------------------")
print("Enter 1. To Display")
print("Enter 2. To Borrow a book")
print("Enter 3. To return a book")
print("Enter 4. To exit")
try:
a=int(input("Select a choice from 1-4: "))
print()
if(a==1):
with open("Vps.txt","r") as f:
lines=f.read()
print(lines)
print ()
elif(a==2):
ListSplit.listSplit()
Borrow.borrowBook()
elif(a==3):
ListSplit.listSplit()
Return.returnBook()
elif(a==4):
print("Thank you for using library management system")
break
else:
print("Please enter a valid choice from 1-4")
except ValueError:
print("Please input as suggested.")
start()
CODING :2
import ListSplit
import dt
def returnBook():
name=input("Enter name of borrower: ")
a="Borrow-"+name+".txt"
try:
with open(a,"r") as f:
lines=f.readlines()
lines=[a.strip("$") for a in lines]
with open(a,"r") as f:
data=f.read()
print(data)
except:
print("The borrower name is incorrect")
returnBook()
b="Return-"+name+".txt"
with open(b,"w+")as f:
f.write("Library Management System n")
f.write("Returned By: "+ name+"n")
f.write(" Date: " + dt.getDate()+" Time:"+ dt.getTime()+"nn")
f.write("S.N.ttBooknamettCostn")
total=0.0
for i in range(3):
if ListSplit.bookname[i] in data:
with open(b,"a") as f:
f.write(str(i+1)+"tt"+ListSplit.bookname[i]+"tt$"+ListSplit.cost[i]+"n
")
ListSplit.quantity[i]=int(ListSplit.quantity[i])+1
total+=float(ListSplit.cost[i])
print("ttttttt"+"$"+str(total))
print("Is the book return date expired?")
print("Press Y for Yes and N for No")
stat=input()
if(stat.upper()=="Y"):
print("By how many days was the book returned late?")
day=int(input())
fine=2*day
with open(b,"a")as f:
f.write("tttttFine: $"+ str(fine)+"n")
total=total+fine
print("Final Total: "+ "$"+str(total))
with open(b,"a")as f:
f.write("tttttTotal: $"+ str(total))
with open("Vps.txt","w+") as f:
for i in range(3):
f.write(ListSplit.bookname[i]+","+ListSplit.authorname[i]+","+str(ListSpli
t.quantity[i])+","+"$"+ListSplit.cost[i]+"n")
def listSplit():
global bookname
global authorname
global quantity
global cost
bookname=[]
authorname=[]
quantity=[]
cost=[]
with open("stock.txt","r") as f:
lines=f.readlines()
lines=[x.strip('n') for x in lines]
for i in range(len(lines)):
ind=0
for a in lines[i].split(','):
if(ind==0):
bookname.append(a)
elif(ind==1):
authorname.append(a)
elif(ind==2):
quantity.append(a)
elif(ind==3):
cost.append(a.strip("$"))
ind+=1
…..
def getDate():
import datetime
now=datetime.datetime.now
#print("Date: ",now().date())
return str(now().date())
def getTime():
import datetime
now=datetime.datetime.now
#print("Time: ",now().time())
return str(now().time())
import dt
import ListSplit
def borrowBook():
success=False
while(True):
firstName=input("Enter the first name of the borrower: ")
if firstName.isalpha():
break
print("please input alphabet from A-Z")
while(True):
lastName=input("Enter the last name of the borrower: ")
if lastName.isalpha():
break
print("please input alphabet from A-Z")
t="Borrow-"+firstName+".txt"
with open(t,"w+") as f:
f.write(" Library Management System n")
f.write(" Borrowed By: "+ firstName+" "+lastName+"n")
f.write(" Date: " + dt.getDate()+" Time:"+ dt.getTime()+"nn")
f.write("S.N. tt Bookname t Authorname n" )
while success==False:
print("Please select a option below:")
for i in range(len(ListSplit.bookname)):
print("Enter", i, "to borrow book", ListSplit.bookname[i])
try:
a=int(input())
try:
if(int(ListSplit.quantity[a])>0):
print("Book is available")
with open(t,"a") as f:
f.write("1. tt"+ ListSplit.bookname[a]+"tt
"+ListSplit.authorname[a]+"n")
ListSplit.quantity[a]=int(ListSplit.quantity[a])-1
with open("Vps.txt","w+") as f:
for i in range(3):
f.write(ListSplit.bookname[i]+","+ListSplit.authorname[i]+","+str(ListSpli
t.quantity[i])+","+"$"+ListSplit.cost[i]+"n")
#multiple book borrowing code
loop=True
count=1
while loop==True:
choice=str(input("Do you want to borrow more books?
However you cannot borrow same book twice. Press y for yes and n for
no."))
if(choice.upper()=="Y"):
count=count+1
print("Please select an option below:")
for i in range(len(ListSplit.bookname)):
print("Enter", i, "to borrow book",
ListSplit.bookname[i])
a=int(input())
if(int(ListSplit.quantity[a])>0):
print("Book is available")
with open(t,"a") as f:
f.write(str(count) +". tt"+
ListSplit.bookname[a]+"tt "+ListSplit.authorname[a]+"n")
ListSplit.quantity[a]=int(ListSplit.quantity[a])-1
with open("Vps.txt","w+") as f:
for i in range(3):
f.write(ListSplit.bookname[i]+","+ListSplit.authorname[i]+","+str(ListSpli
t.quantity[i])+","+"$"+ListSplit.cost[i]+"n")
success=False
else:
loop=False
break
elif (choice.upper()=="N"):
print ("Thank you for borrowing books from us. ")
print("")
loop=False
success=True
else:
print("Please choose as instructed")
else:
print("Book is not available")
borrowBook()
success=False
except IndexError:
print("")
print("Please choose book acording to their number.")
except ValueError:
print("")
print("Please choose as suggested.")
Ip library management project
Ip library management project
Ip library management project
Ip library management project

More Related Content

ODT
Library Management Project (computer science) class 12
PDF
Computer science project on Online Banking System class 12
PDF
IP Project for Class 12th CBSE
PDF
BOOK SHOP SYSTEM Project in Python
PDF
Computer science class 12 project on Super Market Billing
DOCX
CBSE Class 12 Computer practical Python Programs and MYSQL
PDF
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
DOCX
COMPUTER SCIENCE INVESTIGATORY PROJECT ON FOOTBALL GAME AND SCORE MANAGEMENT ...
Library Management Project (computer science) class 12
Computer science project on Online Banking System class 12
IP Project for Class 12th CBSE
BOOK SHOP SYSTEM Project in Python
Computer science class 12 project on Super Market Billing
CBSE Class 12 Computer practical Python Programs and MYSQL
Computer Science Investigatory Project Class XII CBSE(Latest Syllabus)(Python...
COMPUTER SCIENCE INVESTIGATORY PROJECT ON FOOTBALL GAME AND SCORE MANAGEMENT ...

What's hot (20)

PDF
Library Management Python, MySQL
PDF
Computer science project.pdf
PDF
Computer science Project for class 11th and 12th(library management system)
DOC
Ip project
DOCX
computer science with python project for class 12 cbse
PDF
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
PDF
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
DOCX
English project
DOCX
class 12th computer science project Employee Management System In Python
PDF
Computer Project for class 12 CBSE on school management
DOCX
Library Management System
PDF
Computer Science Investigatory Project Class 12
PDF
Python and MySQL Linking Class 12th Project File 23-24
DOCX
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
DOCX
Acknowledgement
PPTX
Economic project
PDF
Employee Management (CS Project for 12th CBSE)
PDF
Computer project final for class 12 Students
PDF
Python Project On Cosmetic Shop system
DOCX
Student DATABASE MANAGeMEnT SysTEm
Library Management Python, MySQL
Computer science project.pdf
Computer science Project for class 11th and 12th(library management system)
Ip project
computer science with python project for class 12 cbse
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
English project
class 12th computer science project Employee Management System In Python
Computer Project for class 12 CBSE on school management
Library Management System
Computer Science Investigatory Project Class 12
Python and MySQL Linking Class 12th Project File 23-24
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
Acknowledgement
Economic project
Employee Management (CS Project for 12th CBSE)
Computer project final for class 12 Students
Python Project On Cosmetic Shop system
Student DATABASE MANAGeMEnT SysTEm
Ad

Similar to Ip library management project (20)

PDF
anjliji.pdf
DOCX
Lokesh 's Ip project Pokemon information
PDF
Digital-Library with pdf for class 12 c.s
DOCX
Project Term2 Computer barun.docx
PPTX
LIBRARY MANAGEMENT library management.pptx
PDF
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
DOCX
A project report on libray mgt system
DOCX
SHUBHI.docx
PPTX
PRESENTATION ON PYTHON.pptx
DOC
c++ program on bookshop for class 12th boards
DOC
Library Management System in c++
DOCX
Computer Science investigatory project class 12
PDF
Library Management Project Description
PDF
ELAVARASAN.pdf
DOCX
Cbse project computer science xii 2018
DOCX
c++ library management
DOCX
PDF
computer science investigatory project .pdf
PPTX
LIBRARY MANAGEMENT SYSTEM ppt.pptx
DOCX
C++ PROGRAM ON THE TOPIC BOOK SHOP IN computer science
anjliji.pdf
Lokesh 's Ip project Pokemon information
Digital-Library with pdf for class 12 c.s
Project Term2 Computer barun.docx
LIBRARY MANAGEMENT library management.pptx
aprojectreportonlibraymgtsystem2-141114055422-conversion-gate02 (1).pdf
A project report on libray mgt system
SHUBHI.docx
PRESENTATION ON PYTHON.pptx
c++ program on bookshop for class 12th boards
Library Management System in c++
Computer Science investigatory project class 12
Library Management Project Description
ELAVARASAN.pdf
Cbse project computer science xii 2018
c++ library management
computer science investigatory project .pdf
LIBRARY MANAGEMENT SYSTEM ppt.pptx
C++ PROGRAM ON THE TOPIC BOOK SHOP IN computer science
Ad

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Lesson notes of climatology university.
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
01-Introduction-to-Information-Management.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Classroom Observation Tools for Teachers
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
RMMM.pdf make it easy to upload and study
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
Microbial diseases, their pathogenesis and prophylaxis
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Lesson notes of climatology university.
A systematic review of self-coping strategies used by university students to ...
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Computing-Curriculum for Schools in Ghana
01-Introduction-to-Information-Management.pdf
Complications of Minimal Access Surgery at WLH
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Final Presentation General Medicine 03-08-2024.pptx
Classroom Observation Tools for Teachers
Abdominal Access Techniques with Prof. Dr. R K Mishra
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
RMMM.pdf make it easy to upload and study
O5-L3 Freight Transport Ops (International) V1.pdf

Ip library management project

  • 1. TOPIC:LIBRARY MANAGEMENT PROJECT CBSE ROLL NO. : ……………………………….. SESSION : 2020-21 INFORMATICS PRACTICES (Python) CLASS 12th SUBMITTED BY:ANKIT RAWAT SUBMITTED TO: CBSE, Under The Supervision OfMr. SURESH KUMAR GOOD SAMARITAN SCHOOL, JASOLA ALL INDIA SENIOR SCHOOL CERTIFICATE EXAMINATION
  • 2. CERTIFICATE Thisis to certify thatMaster ANKIT RAWAT studying in GOOD SAMARITAN SCHOOL of standard 12th Bhas completed INFORMATICSPRACTICES (python)project Mrs. INDU PRASAD
  • 3. (PRINCIPAL) I express my deep gratitude and appreciation to those who agreed in this project, for their time expended and courage in sharing their insights with a fledging student. It is to them that I am most indebted, and I can only hope that the product of our collaboration benefits each one as much as I benefited from the process. I had been immeasurably enriched by working under the supervision of Mr. Suresh kumar the subject (INFORMATICS PRACTICES) teacher, who has a great level of knowledge and who has an art of encouraging , correcting and directing me in every situation possible, which has enabled me to complete the project. At times, my studies carried out at great coat to those closest to me. I thank my family and my fellow students for their best understanding and support. I acknowledge to all the people who have involved and supported me in making this project. Withthanks… ACKNOWLEDGEMENT
  • 4. ANKITRAWAT 12TH B MYSELF,ANKIT RAWAT FEELING SO THANKFUL TO OUR HOUNERABLE PRINCIPALMAMMRS.INDU PRASAD WHO ENCOURAGED US TO FACE PROBLEM ANALYTICALLY AND MY WORTHY INFORMATICS PRACTICES TEACHER Mr. SURESH SIRWHO INSPIRED US AND ACKNOWLEDGE US ALL THE VALUABLE SUGGESTION FOR IMPROVEMENT OF PROJECT . I’M ALSO WANTS TO THANKS A LOT TO CBSE WHICH PROVIDES US A BIG GOLDENOPPORTUNITY BY WHICH WE GET SOME PRACTICAL KNOWLEDGE OF DAY TO DAY TO WORKING THANKS
  • 6. LIBRARYMANAGEMENT Coding:-1 import Return import ListSplit import dt import Borrow def start(): while(True): print("Welcome to the library management system") print("-------------------------------------------------------------------------------- -------------------------------------") print("Enter 1. To Display") print("Enter 2. To Borrow a book") print("Enter 3. To return a book") print("Enter 4. To exit")
  • 7. try: a=int(input("Select a choice from 1-4: ")) print() if(a==1): with open("Vps.txt","r") as f: lines=f.read() print(lines) print () elif(a==2): ListSplit.listSplit() Borrow.borrowBook() elif(a==3): ListSplit.listSplit() Return.returnBook() elif(a==4): print("Thank you for using library management system") break else: print("Please enter a valid choice from 1-4")
  • 8. except ValueError: print("Please input as suggested.") start() CODING :2 import ListSplit import dt def returnBook(): name=input("Enter name of borrower: ") a="Borrow-"+name+".txt" try: with open(a,"r") as f: lines=f.readlines() lines=[a.strip("$") for a in lines] with open(a,"r") as f: data=f.read() print(data) except: print("The borrower name is incorrect") returnBook()
  • 9. b="Return-"+name+".txt" with open(b,"w+")as f: f.write("Library Management System n") f.write("Returned By: "+ name+"n") f.write(" Date: " + dt.getDate()+" Time:"+ dt.getTime()+"nn") f.write("S.N.ttBooknamettCostn") total=0.0 for i in range(3): if ListSplit.bookname[i] in data: with open(b,"a") as f: f.write(str(i+1)+"tt"+ListSplit.bookname[i]+"tt$"+ListSplit.cost[i]+"n ") ListSplit.quantity[i]=int(ListSplit.quantity[i])+1 total+=float(ListSplit.cost[i]) print("ttttttt"+"$"+str(total))
  • 10. print("Is the book return date expired?") print("Press Y for Yes and N for No") stat=input() if(stat.upper()=="Y"): print("By how many days was the book returned late?") day=int(input()) fine=2*day with open(b,"a")as f: f.write("tttttFine: $"+ str(fine)+"n") total=total+fine print("Final Total: "+ "$"+str(total)) with open(b,"a")as f: f.write("tttttTotal: $"+ str(total)) with open("Vps.txt","w+") as f: for i in range(3):
  • 11. f.write(ListSplit.bookname[i]+","+ListSplit.authorname[i]+","+str(ListSpli t.quantity[i])+","+"$"+ListSplit.cost[i]+"n") def listSplit(): global bookname global authorname global quantity global cost bookname=[] authorname=[] quantity=[] cost=[] with open("stock.txt","r") as f: lines=f.readlines() lines=[x.strip('n') for x in lines] for i in range(len(lines)): ind=0 for a in lines[i].split(','):
  • 13. return str(now().time()) import dt import ListSplit def borrowBook(): success=False while(True): firstName=input("Enter the first name of the borrower: ") if firstName.isalpha(): break print("please input alphabet from A-Z") while(True): lastName=input("Enter the last name of the borrower: ") if lastName.isalpha(): break print("please input alphabet from A-Z") t="Borrow-"+firstName+".txt" with open(t,"w+") as f:
  • 14. f.write(" Library Management System n") f.write(" Borrowed By: "+ firstName+" "+lastName+"n") f.write(" Date: " + dt.getDate()+" Time:"+ dt.getTime()+"nn") f.write("S.N. tt Bookname t Authorname n" ) while success==False: print("Please select a option below:") for i in range(len(ListSplit.bookname)): print("Enter", i, "to borrow book", ListSplit.bookname[i]) try: a=int(input()) try: if(int(ListSplit.quantity[a])>0): print("Book is available") with open(t,"a") as f: f.write("1. tt"+ ListSplit.bookname[a]+"tt "+ListSplit.authorname[a]+"n") ListSplit.quantity[a]=int(ListSplit.quantity[a])-1
  • 15. with open("Vps.txt","w+") as f: for i in range(3): f.write(ListSplit.bookname[i]+","+ListSplit.authorname[i]+","+str(ListSpli t.quantity[i])+","+"$"+ListSplit.cost[i]+"n") #multiple book borrowing code loop=True count=1 while loop==True: choice=str(input("Do you want to borrow more books? However you cannot borrow same book twice. Press y for yes and n for no.")) if(choice.upper()=="Y"): count=count+1 print("Please select an option below:") for i in range(len(ListSplit.bookname)): print("Enter", i, "to borrow book", ListSplit.bookname[i]) a=int(input())
  • 16. if(int(ListSplit.quantity[a])>0): print("Book is available") with open(t,"a") as f: f.write(str(count) +". tt"+ ListSplit.bookname[a]+"tt "+ListSplit.authorname[a]+"n") ListSplit.quantity[a]=int(ListSplit.quantity[a])-1 with open("Vps.txt","w+") as f: for i in range(3): f.write(ListSplit.bookname[i]+","+ListSplit.authorname[i]+","+str(ListSpli t.quantity[i])+","+"$"+ListSplit.cost[i]+"n") success=False else: loop=False break elif (choice.upper()=="N"): print ("Thank you for borrowing books from us. ") print("") loop=False success=True
  • 17. else: print("Please choose as instructed") else: print("Book is not available") borrowBook() success=False except IndexError: print("") print("Please choose book acording to their number.") except ValueError: print("") print("Please choose as suggested.")