Ip Project 23
Ip Project 23
CLASS : XII-C
1
ROLL NO.:
2
Acknowledgment
I would like to take this opportunity to thank my
Informatics Practices Teacher, Ms. Madhurima Kashyap
ma’am, for encouraging and guiding me in my project and for
providing valuable suggestions and information. I would like
to extend my gratitude to the principal Dr.
H.S. Vashisth Sir for providing me with this opportunity to
make this insightful project. I would like to thank my
parents for their generous support throughout my schooling.
I believe this small project will make a significant impact by
inspiring someone else too.
THANK YOU
3
INDEX:
3. Output 15-
19
4
Hardware Requirement:
1. Monitor
2. CPU Monitor
3. Mouse
4. Pen Drive
5. Printer
Software Requirement:
1. Python
5
INTRODUCTION:
General Description
About Python:
Python is a high-level, interpreted, object-oriented language with semantics.
Its dynamic typing, dynamin binding, and high-level built-in data structures
make it an appealing language for Rapid Application Development. It may
also be used as a scripting or glue language to join existing components.
Python's easy-to-learn syntax prioritizes
readability, which lowers software maintenance costs. Python's support for
packages and modules promotes code reuse and program
modularity. The large standard library and the Python interpreter are freely
distributable and free to use in source or binary form for all major systems.
6
About Project:
7
PYTHON
CODE
8
import pandas as pd
import numpy as np
def main_menu():
print(" LIBRARY MANAGEMENT ")
print("\n 1. Book List Menu")
print("2. Management")
print("3. Inventory")
print("4. Export File")
print("5. Esc\n")
def create_edit_database_menu():
print(" CREATE/EDIT DATABASE ")
print("1. New Book List")
print("2. Import Book List from csv File")
print("3. Add Book")
print("4. Remove Book")
print("5. Esc\n")
def book_management_menu():
print(" BOOK MANAGEMENT ")
print("1. Issue Book")
print("2. Return Book")
print("3. esc\n")
def book_inventory_menu():
print(" INVENTORY ")
print("1. Complete List")
print("2. Sort by Author Name")
9
print("3. Available Books")
print("4. Issued Book List by StudentID")
print("5. esc\n")
# Main Application
cols=['SrNo','Name','Author Name','Genre','StudentID']
df=pd.DataFrame([],columns=cols)
while True:
main_menu()
x = int(input("Select : "))
if x == 1:
create_edit_database_menu()
y = int(input("Select Option no : "))
if y == 1:
while True:
z = input("Add new book [Y/N]: ")
if z.upper() == 'Y':
SrNo = int(input("SrNo : "))
BookName = input("Book Name : ")
AuthorName= input("Author Name : ")
Genre = input("Genre : ")
StudentID = np.NaN
data.append([SrNo,BookName,AuthorName,Genre,StudentID])
else:
break
df =
pd.DataFrame(data,columns=cols) elif y == 2:
10
# Import Book List from File
elif y == 3:
print("Add book")
SrNo = int(input("SrNo : "))
BookName = input("Book Name : ")
AuthorName= input("Author Name : ")
Genre = input("Genre : ")
StudentID = np.NaN
df=df.append({"SrNo":SrNo,"BookName":BookName,"AuthorName":AuthorName,"G
enre":Genre,"StudentID":StudentID},ignore_index=True)
elif y == 4:
elif y == 5:
elif x == 2:
book_management_menu()
y = int(input("Select OptionNo : "))
if y == 1:
11
n = int(input("Enter index: "))
m = input("Enter student id :
") df.loc[n,['StudentID']] = [1,
m] print(df)
elif y == 2:
n = int(input("Enter index : "))
df.loc[n,[ 'StudentID']] = [np.NaN]
print(df)
elif x == 3:
book_inventory_menu()
y = int(input("Select OptionNo : "))
if y == 1:
print(df)
elif y == 2:
elif y == 3:
available_df=df[df.count["Srno"]
print(available_df)
elif y == 4:
12
print("Back to Main Menu")
elif y == 5:
elif x == 6:
# Exit from Program
print("Exiting the Application")
break
13
OUTPUT
14
LIBRARY MANAGEMENT
1. Book List Menu
2. Management
3. Inventory
4. Export File
5. Esc
Select: 1
Option: 2
LIBRARY MANAGEMENT
1. Book List Menu
2. Management
3. Inventory
4. Export File
5. Esc
Select: 1
15
2. Import Book List from csv File
3. Add Book
4. Remove Book
5. Esc
Option: 3
LIBRARY MANAGEMENT
1. Book List Menu
2. Management
3. Inventory
4. Export File
5. Esc
Select: 2
BOOK MANAGEMENT
1. Issue Book
2. Return Book
3. Esc
Option: 1
Enter index: 1
Enter student id : S001
LIBRARY MANAGEMENT
1. Book List Menu
2. Management
3. Inventory
4. Export File
16
5. Esc
Select: 3
INVENTORY
1. Complete List
2. Sort by Author name
3. Available Books
4. Issued Book List by StudentID
5. Esc
Option: 1
Option: 2
Option: 3
Option: 4
17
1. Fight Club Chuck Palahniuk Satire S001
LIBRARY MANAGEMENT
1. Book List Menu
2. Management
3. Inventory
4. Export File
5. Esc
Select: 4
18
DECLARATION
DATE:
SIGNATURE OF THE STUDENT:
19