0% found this document useful (0 votes)
27 views19 pages

Ip Project 23

Uploaded by

Jatin Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views19 pages

Ip Project 23

Uploaded by

Jatin Yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

NAME : JATIN YADAV

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:

Sr.No. Contents Page


No.

1. About Python 6-7


About Project

2. Source Code 9-13

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:

As consumers' demands for books increase, it becomes imperative to


organize and conveniently handle records in order to study the
growing interest in the genre of the books.

The primary focus of a bookstore management system is on


providing every one with a user-friendly system, which allows them
to find books, create and manage book lists, keep track of latest
trends, and find various books of all genre. This is perfect for book
stores of all sizes because of the flexible database, practical features,
maximum growth in customer service, and
precise information access.

7
PYTHON
CODE

8
import pandas as pd

import numpy as np

# Function to Print Main Menu

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

# Function to Print/Create/Edit the New Data Base Menu

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

# Function to Print the Book Management Menu

def book_management_menu():
print(" BOOK MANAGEMENT ")
print("1. Issue Book")
print("2. Return Book")
print("3. esc\n")

# Function to Print & Display Book Inventory Menu

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']

# Create an empty DataFrame

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:

# Create New Book List

print("Enter book list")


data=[]

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

file=input("Enter File Name : ")


df=pd.read_csv(file)
print(df)

elif y == 3:

# Add New Book

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:

# Remove existing book

SrNo=int(input("Enter SrNo to delete: "))


df.drop(df[df['SrNo'] == SrNo].index, inplace = True)

elif y == 5:

# Back to Main Menu

print("Back to Main Menu")

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 Complete Book List

print(df)

elif y == 2:

#Book List by Author

author=input("Enter Author Name : ")


author_df=df[df["Author"]==author]
print(author_df)

elif y == 3:

#Available Book List

available_df=df[df.count["Srno"]
print(available_df)

elif y == 4:

# Back to Main Menu

12
print("Back to Main Menu")

elif y == 5:

# Export Data to File

file = input("File Name: ")


print("Exporting Data to File ",file)
df.to_csv(file,index=False)

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

CREATE/ EDIT DATA BASE


1. New Book List
2. Import Book List from csv File
3. Add Book
4. Remove Book
5. Esc

Option: 2

Enter File Name: BOOK LIST.csv

SrNo Book Name Author Name Genre Student ID


1. Fight Club Chuck Palahniuk Satire S001
2. Gone Girl Gillian Flynn Thriller S402
3. The Silence of Thomas Harris Mystery S103
the lambs

LIBRARY MANAGEMENT
1. Book List Menu
2. Management
3. Inventory
4. Export File
5. Esc

Select: 1

CREATE/ EDIT DATA BASE


1. New Book List

15
2. Import Book List from csv File
3. Add Book
4. Remove Book
5. Esc

Option: 3

Add new book [Y/N] : Y


SrNo : 4
Book Name : Pride and Prejudice
Author Name : Jane Austen
Genre: Romance
Student ID : S505

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

SrNo Book Name Author Name Genre Student ID


1. Fight Club Chuck Palahniuk Satire S001
2. Gone Girl Gillian Flynn Thriller S402
3. The Silence of Thomas Harris Mystery S103
the lambs

Option: 2

Enter Author Name : Thomas Harris

1. The Silence of Thomas Harris Mystery S103


the lambs

Option: 3

SrNo Book Name Author Name Genre Student ID


1. Fight Club Chuck Palahniuk Satire S001
2. Gone Girl Gillian Flynn Thriller S402
3. The Silence of Thomas Harris Mystery S103
the lambs

Option: 4

Enter Student ID : S001

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

File Name: Books total


Exporting Data to File Final Book List

18
DECLARATION

I, Dev Kumar, Roll No. a student of Delhi Public


School, Navi Mumbai humbly submit that I have completed the
project work as described in this by my own skills and study as per
the instructions given by my teacher, Ms. Madhurima Kashyap and
that I have not copied the report or its any appreciable parts from any
other literature in contravention of the academic ethics.

DATE:
SIGNATURE OF THE STUDENT:

19

You might also like