Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
23 views
Class 12 CS Project File
Class 12 Computer science Project file
Uploaded by
mounthillacademychandanvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Class 12 CS Project File For Later
Download
Save
Save Class 12 CS Project File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
23 views
Class 12 CS Project File
Class 12 Computer science Project file
Uploaded by
mounthillacademychandanvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Class 12 CS Project File For Later
Carousel Previous
Carousel Next
Download
Save
Save Class 12 CS Project File For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 20
Search
Fullscreen
ACKNOWLEDGEMENT I would like to convey my heartfelt thanks to Ms. Disha Dias my faculty of Computer Science who gave her valuable suggestions and guidance for the completion of my project. She helped me to comprehend important details of the project. My project has been successful only because of her able guidance and support. ‘Signature of the Principal ‘Signature of the Subject TeacherCONTENTS TOPIC PAGE NO, COVER PAGE w ACKNOWLEDGEMENT Gi) MAIN CODE FOR LIBRARY MANAGEMENT SYSTEM DATABASE AND TABLE DESCRIPTION EXECUTING THE CODE ERRORS BIBLIOGRAPHYMain Code for Library Management SystemLIBRARY MANAGEMENT SYSTEM: import mysql.connector as msc mydb=msc. connect (host=" localhost’ ,user="root' ,passwd="python' ) cur=mydb. cursor() print("*" * Welcome to Library Management System ** “any #Creating Database: cur.execute("create database if not exists library_management_system") cur.execute("use library_management_system") cur.execute("create table if not exists available_books(id int primary key not null,name varchar(25) not null,subject varchar(25) not null,quantity int not null)") cur.execute("create table if not exists issued_books(id int not null,book_name varchar(25) not null,book_subject varchar(25) not null,stu_name varchar(200) primary key not null,stu_class varchar(25) not null,date_of_issue date not null,date_of_return date not null)") cur.execute("create table if not exists login(user varchar(25) not null, password varchar(25) primary key not null)") mydb. commit () flags cur.execute("select * from login") for i in cur: #if login doesn't have any value, loop will not execute!! flag = 1 if flage=0: cur.execute("insert into login values(‘Admin@123" ,'1234')") mydb. commit () #Loop-->Main Working while True: print(""" 1. Login 2.Exit = c=int(input("Enter your choice : ")) if cee1: #login conti=input("Enter Username : ") cont2=input("Enter Password : “) cur.execute("select * from login") for i in cur: t_user, t_pas=iif cont1==t_user and cont2==t_pas: print("Login Successful 11") loopi='n" while loopl=='n': print(""" 1. Add new books 2. Remove any book 3. Issue book to student 4. Return book 5. View available books 6. View issued books 7. Logout “my ch=int(input("Enter your choice : ")) if che=1: wadding Books loop2="y while loop2=="'y': print("Please enter the required data correctly !!") b_id=int(input("Enter book id : ")) b_name=input("Enter book name : ") Sub=input("Enter subject : ") quant=int(input("“Enter quantity : “)) cur.execute("insert into available_books values('"+str(b_id)+"",‘"+b_name+"', ‘"+sube"", ‘"+ste(quant)+"")") mydb. commit () print("Data inserted successfully !!") oop2=input ("Do you want to add more books? Press (y/n) as per your choice : “).lower() loopi=input("Do you want to logout? Press (y/n) as per your choice : “).lower() elif che=2: #Removing Books cur.execute("select id from available_books") count=@ for i in cur: idd=i count=count+1 if count==0: print("There are no available books !!") else:b_id=int(input("Enter book id to remove the required cur.execute("select * from available_books") flag=@ for i in cur: t_id, t_name, t_sub,t_quant=i if t_ide=b_id: flage1 if flag==1: cur.execute(“delete from available_books where id='"+str(b_id)+""") mydb.commit() print("Data deleted successfully !!") else: print("Please enter correct id 11") elif ch==3: #Issuing Books b_Ad-int(input("Enter book id : ")) Flag=0 cur.execute("select * from available_books where id='"+ste(b_id)+""") for i in cur: t_id, t_name, t_sub, t_quant=i flag=1 if flag!=1: print("Please enter the correct id as per the available books I! ") else: if t_quant>e: S_name=input("Enter student name : ") s_class=input("Enter student class : “) s_doi=input(“Enter date of issue : “) s_dor=input(“Enter date of return : ") cur.execute("insert into issued_books values(‘"+str(b_id)+"",'"+t_name+"','"+t_sub+"', "+s _names"?, '"+s_classe"', '"+s _doit"*, *"+s_dor+"*)") quan=t_quant-1. cur.execute("update available_books set quantity='"+str(quan)+"" where id='"+str(b_id)+"'") mydb.commit() print("Book issued successfully !!")else: print("Books are issued already !! Please wait until they are returned or issue another book !!") elif ch==4: #Returning Books b_idsint(input("Enter id of the book to be returned : ")) -) sname=input("Enter name of the student who issued the book flag-0 tidee t_name=0 t_quant=@ c=8 1-0 3 cur.execute("select distinct id from issued_books order by o for i in cur: if int(i[@])==b_id: t_idsint(i[e]) flagt=1 if flag==0: print("No such book is issued !!") else: cur.execute("select stu_name from available_books A,issued_books I where A.id='"+str(t_id)+"' and A.id=I.id and I. stu_name='"+sname+"*") for i in cur: t_namesstr(i[@]) cect] if cl=0: cur.execute("select quantity from available_books where id='"+str(t_id)+"'") for j in cur: t_quant=int(j[@]) clt=1 if c1l=0: quant=t_quant+1 cur.execute("update available_books set quantity=""+str(quant)+"" where id='"+str(t_id)+"'") cur.execute(“delete from issued_books where id='"+str(t_id)+"' and stu_name='"+t_name+"'") mydb. commit () print("Book returned successfully !!") else:print("No such student has issued this book !!") elif ch==5: #Display Books print("ID , NAME , SUBJECT , QUANTITY") cur.execute("select * from available_books") a=cur.fetchall() for i in a: print(i) mydb. commit () elif ch==6: #Display Issued Books print("ID , NAME , SUBJECT , S_NAME , S CLASS") cur.execute(select * from issued_books") azcur.fetchall() for i in a: print (i) mydb..commit() elif ch==7: break else: print("Invalid input !!") else: print("Wrong username/password !!") elif cx=2: break else: print("Invalid input !!")Database and Table DescriptionDescription of the table “issued_books”Description of the table “login”Executing the Code: Adding New BooksTable “available_books” after removing bookIssuing Books Table “available_books” after issuing books Returning BookTable “available_books” and Table “issued_books” after returning book Displaying Available BooksAdd new books ‘any book Toeue book to student Return book View available books View Issued books Logout Enter your choice + € 1D , MAME, SUBJECT , MAME, 9 CLASS 3," toavat!, ‘athematics', ‘Anahuman’ Displaying Issued Books + 112", datetine.date (2023, 12, 20), datetime.date(2023, 12, 271) 1. Add new books 2. Remove any book 3. Issue book to student 4. Return book 5. View available books 6. View issued books 7. Logout Enter your choice : 7 1.Login 2.Exit Enter your choice : 2 >>> Exiting the programErrorsAdd new books Remove any book Issue book to student Return book View available books View issued books Enter your choice Invalid input !! Invalid Choice ** Welcome to Library Management System ** 1.Login 2.Exit Enter your choice : 1 Enter Username : Navdeep Enter Password : 12 Wrong username/password !! 1.Login 2.Exit Enter your choice : Invalid CredentialsAdd new books Remove any book Issue book to student Return book View available books View issued books Enter your choice : 3 Enter book id : 34 [Please enter the correct id as per the available books !! 1. Add new books 2. Remove any book 3. Issue book to student 4. Return book | 5. View available books 6. View issued books | 7. Logout Enter your choice : 2 Enter book id to remove the required book : 76 |Please enter correct id !! Wrong book id entered while Issuing or Removing book 1. Add new books 2. Remove any book 3. Issue book to student 4. Return book 5. View available books 6. View issued books 7. Logout lenter your choice : 4 |Enter id of the book to be returned : 34 |Enter name of the student who issued the book : Akshat No such book is issued !! Wrong input while returning bookBIBLIOGRAPHY: © Computer Science with python — Sumita Arora ©¢ www.mysql.com © www.python.org
You might also like
Adobe Scan Dec 16, 2024
PDF
No ratings yet
Adobe Scan Dec 16, 2024
6 pages
Library Management System Project
PDF
No ratings yet
Library Management System Project
32 pages
# LIBRARY MANAGEMENT SYSTEM #3 CODE
PDF
No ratings yet
# LIBRARY MANAGEMENT SYSTEM #3 CODE
4 pages
Shri Sanatan Dharam Saraswati Bal Mandir
PDF
No ratings yet
Shri Sanatan Dharam Saraswati Bal Mandir
25 pages
CS project 2024-25
PDF
No ratings yet
CS project 2024-25
19 pages
laksh new
PDF
No ratings yet
laksh new
20 pages
CS PROJECT
PDF
No ratings yet
CS PROJECT
24 pages
Sample Computer Project File
PDF
No ratings yet
Sample Computer Project File
18 pages
computer science activity
PDF
No ratings yet
computer science activity
19 pages
Computer Scinece Class 12 Project Library Management System
PDF
No ratings yet
Computer Scinece Class 12 Project Library Management System
28 pages
vaidehi new
PDF
No ratings yet
vaidehi new
20 pages
Tushar CS
PDF
No ratings yet
Tushar CS
20 pages
Ip Docs
PDF
No ratings yet
Ip Docs
36 pages
LIBRARY MANAGEMENT CLASS 12
PDF
No ratings yet
LIBRARY MANAGEMENT CLASS 12
21 pages
Jeet Project
PDF
No ratings yet
Jeet Project
29 pages
Library Mangement-2
PDF
No ratings yet
Library Mangement-2
27 pages
Jashan
PDF
No ratings yet
Jashan
20 pages
cs ka project
PDF
No ratings yet
cs ka project
26 pages
Computer Science Lib
PDF
No ratings yet
Computer Science Lib
28 pages
CS PROJECT LIBRARY MANAGEMENT ABHYUDAY PANDEY
PDF
No ratings yet
CS PROJECT LIBRARY MANAGEMENT ABHYUDAY PANDEY
41 pages
t
PDF
No ratings yet
t
40 pages
Shreya
PDF
No ratings yet
Shreya
7 pages
Digital-Library.docx (1) (1) (1)
PDF
No ratings yet
Digital-Library.docx (1) (1) (1)
26 pages
CS Project
PDF
No ratings yet
CS Project
10 pages
Cs Main
PDF
No ratings yet
Cs Main
17 pages
DO NOT DARE TO COPY IT
PDF
No ratings yet
DO NOT DARE TO COPY IT
37 pages
cover )))
PDF
No ratings yet
cover )))
28 pages
Code2pdf 672c673ee0671
PDF
No ratings yet
Code2pdf 672c673ee0671
4 pages
Python Code
PDF
No ratings yet
Python Code
4 pages
Library Management System (SP)
PDF
No ratings yet
Library Management System (SP)
27 pages
DV 210220053508
PDF
No ratings yet
DV 210220053508
30 pages
Computer Science Project Sumit
PDF
No ratings yet
Computer Science Project Sumit
27 pages
Cs Project IP Sanjeev
PDF
No ratings yet
Cs Project IP Sanjeev
27 pages
Comp - Sci. Library Management Python Project
PDF
No ratings yet
Comp - Sci. Library Management Python Project
30 pages
Project demo
PDF
No ratings yet
Project demo
20 pages
AryanP Py
PDF
No ratings yet
AryanP Py
9 pages
Library Management
PDF
No ratings yet
Library Management
24 pages
project library_1
PDF
No ratings yet
project library_1
12 pages
PRISHA - IP
PDF
No ratings yet
PRISHA - IP
26 pages
Library Management Neww
PDF
No ratings yet
Library Management Neww
25 pages
Bhavi
PDF
No ratings yet
Bhavi
20 pages
Cs Practical 1
PDF
No ratings yet
Cs Practical 1
18 pages
25621069 library management system
PDF
No ratings yet
25621069 library management system
19 pages
Computer Project Sample 1
PDF
No ratings yet
Computer Project Sample 1
27 pages
1672809537355library Managment System Python Mysql Code
PDF
No ratings yet
1672809537355library Managment System Python Mysql Code
11 pages
COMPUTER SCIENCE PROJECT Sanjay Converted by Abcdpdf
PDF
100% (1)
COMPUTER SCIENCE PROJECT Sanjay Converted by Abcdpdf
34 pages
Library Management
PDF
No ratings yet
Library Management
38 pages
Done Project Cs
PDF
No ratings yet
Done Project Cs
16 pages
Cs Project
PDF
No ratings yet
Cs Project
30 pages
Csproject
PDF
No ratings yet
Csproject
15 pages
IP Invst Proj (Sample)
PDF
No ratings yet
IP Invst Proj (Sample)
21 pages
karansahu
PDF
No ratings yet
karansahu
6 pages
Ooooooooo
PDF
No ratings yet
Ooooooooo
15 pages
COMPUTER SCIENCE PROJECT CLASS 12
PDF
No ratings yet
COMPUTER SCIENCE PROJECT CLASS 12
18 pages
ADAMAS WORLD SCHOOL
PDF
No ratings yet
ADAMAS WORLD SCHOOL
5 pages
librarymgmt
PDF
No ratings yet
librarymgmt
14 pages
Sample FIle
PDF
No ratings yet
Sample FIle
20 pages
Library Management System Ip Project
PDF
100% (1)
Library Management System Ip Project
21 pages
COMPUTER SCIENCE PROJECT DRAFT
PDF
No ratings yet
COMPUTER SCIENCE PROJECT DRAFT
19 pages