SlideShare a Scribd company logo
1 of 21
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

What's hot

Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdfHarshitSachdeva17
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul PatelMitul Patel
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementRemaDeosiSundi
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...AnkitSharma1903
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)lokesh meena
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 
English ASL Project Work - The Enemy - The Conflict of Human Emotions
English ASL Project Work - The Enemy - The Conflict of Human EmotionsEnglish ASL Project Work - The Enemy - The Conflict of Human Emotions
English ASL Project Work - The Enemy - The Conflict of Human EmotionsHarlincoln Singh Thandi
 
Factors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell dependsFactors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell dependsHarsh Solanki
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science ProjectAshwin Francis
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In PythonAbhishekKumarMorla
 
Physics investigatory project for class 12
Physics investigatory project for class 12Physics investigatory project for class 12
Physics investigatory project for class 12Kavita Kulkarni
 
Chemistry project part 1 caseins in milk......
Chemistry project part 1 caseins in milk......Chemistry project part 1 caseins in milk......
Chemistry project part 1 caseins in milk......AnuragSharma530
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking systemAnurag Yadav
 
Various factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell dependsVarious factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell dependsParthMehray
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSESylvester Correya
 
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKTO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKAnkitSharma1903
 
Bank management system
Bank management systemBank management system
Bank management systemumangyadav32
 

What's hot (20)

Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul Patel
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school management
 
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
To find the refractive indexes of (a) water,(b) oil using a plane mirror, an ...
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
English ASL Project Work - The Enemy - The Conflict of Human Emotions
English ASL Project Work - The Enemy - The Conflict of Human EmotionsEnglish ASL Project Work - The Enemy - The Conflict of Human Emotions
English ASL Project Work - The Enemy - The Conflict of Human Emotions
 
Factors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell dependsFactors on which the internal resistance/emf of a cell depends
Factors on which the internal resistance/emf of a cell depends
 
Ip project
Ip projectIp project
Ip project
 
ASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECTASL/ALS CLASS 12 ENGLISH PROJECT
ASL/ALS CLASS 12 ENGLISH PROJECT
 
English Project work.pdf
English Project work.pdfEnglish Project work.pdf
English Project work.pdf
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
 
Physics investigatory project for class 12
Physics investigatory project for class 12Physics investigatory project for class 12
Physics investigatory project for class 12
 
Chemistry project part 1 caseins in milk......
Chemistry project part 1 caseins in milk......Chemistry project part 1 caseins in milk......
Chemistry project part 1 caseins in milk......
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking system
 
Various factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell dependsVarious factors on which the internal resistance of a cell depends
Various factors on which the internal resistance of a cell depends
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
 
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILKTO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
TO STUDY THE QUANTITY OF CASEIN PRESENT IN DIFFERENT SAMPLES OF MILK
 
Bank management system
Bank management systemBank management system
Bank management system
 

Similar to Ip library management project

student-data-management-1-2.doc
student-data-management-1-2.docstudent-data-management-1-2.doc
student-data-management-1-2.docJagaBehera1
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQLvikram mahendra
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ reportvikram mahendra
 
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptxCOMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptxmv9499596
 
Study material ip class 12th
Study material ip class 12thStudy material ip class 12th
Study material ip class 12thanimesh dwivedi
 
Lokesh 's Ip project Pokemon information
Lokesh 's Ip project Pokemon informationLokesh 's Ip project Pokemon information
Lokesh 's Ip project Pokemon informationbholu803201
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData StackPeadar Coyle
 
Book store automation system
Book store automation systemBook store automation system
Book store automation systemUpendra Sengar
 
Kotlin coroutines and spring framework
Kotlin coroutines and spring frameworkKotlin coroutines and spring framework
Kotlin coroutines and spring frameworkSunghyouk Bae
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMManuel Bernhardt
 
Tailieu.vncty.com c++ for beginners......masters 2007
Tailieu.vncty.com c++ for beginners......masters 2007Tailieu.vncty.com c++ for beginners......masters 2007
Tailieu.vncty.com c++ for beginners......masters 2007Trần Đức Anh
 
sumit report inventory management python project.pdf
sumit report inventory management python project.pdfsumit report inventory management python project.pdf
sumit report inventory management python project.pdfsumitgiri32
 
Types Working for You, Not Against You
Types Working for You, Not Against YouTypes Working for You, Not Against You
Types Working for You, Not Against YouC4Media
 

Similar to Ip library management project (20)

student-data-management-1-2.doc
student-data-management-1-2.docstudent-data-management-1-2.doc
student-data-management-1-2.doc
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
 
sypf1(1)2022.docx
sypf1(1)2022.docxsypf1(1)2022.docx
sypf1(1)2022.docx
 
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptxCOMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
COMPUTER SCIENCE PROJECT ON HISTORICAL PLACE.pptx
 
ELAVARASAN.pdf
ELAVARASAN.pdfELAVARASAN.pdf
ELAVARASAN.pdf
 
Study material ip class 12th
Study material ip class 12thStudy material ip class 12th
Study material ip class 12th
 
Lokesh 's Ip project Pokemon information
Lokesh 's Ip project Pokemon informationLokesh 's Ip project Pokemon information
Lokesh 's Ip project Pokemon information
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData Stack
 
Book store automation system
Book store automation systemBook store automation system
Book store automation system
 
Kotlin coroutines and spring framework
Kotlin coroutines and spring frameworkKotlin coroutines and spring framework
Kotlin coroutines and spring framework
 
Python for data analysis (ITP and NPV)
Python for data analysis (ITP and NPV)Python for data analysis (ITP and NPV)
Python for data analysis (ITP and NPV)
 
C++chapter2671
C++chapter2671C++chapter2671
C++chapter2671
 
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMVoxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
 
C++ for beginners......masters 2007
C++ for beginners......masters 2007C++ for beginners......masters 2007
C++ for beginners......masters 2007
 
C++ for beginners......masters 2007
C++ for beginners......masters 2007C++ for beginners......masters 2007
C++ for beginners......masters 2007
 
Tailieu.vncty.com c++ for beginners......masters 2007
Tailieu.vncty.com c++ for beginners......masters 2007Tailieu.vncty.com c++ for beginners......masters 2007
Tailieu.vncty.com c++ for beginners......masters 2007
 
sumit report inventory management python project.pdf
sumit report inventory management python project.pdfsumit report inventory management python project.pdf
sumit report inventory management python project.pdf
 
Types Working for You, Not Against You
Types Working for You, Not Against YouTypes Working for You, Not Against You
Types Working for You, Not Against You
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 

Recently uploaded (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

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.")