Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

COMPUTER INVESTIGATORY PROJECT ON

“Store Management System”


Submitted towards the partial fulfilments of Class XII
Half Yearly Practical examination for the session 2022-23

Under the Guidance of Miss Geetanjali Hota

NAME :- Tanmay Sharma


CLASS :- XII-B
ROLL NO./SCHOOL NO. :- 33/9079
AISSCE ROLL NO. :-12653959

D.A.V. PUBLIC SCHOOL, POKHARIPUT


DECLARATION
I, TANMAY SHARMA, a student of class XII ‘B’ of D.A.V. Public School,
Pokhariput, hereby submit the project on “Sales and Inventory
Management System” for the Computer practical of AISSCE 2022-23.

This project consist of the original work done by me under the able
guidance and supervision of my Computer teacher, Geetanjali Hota
Ma’am.

NAME : TANMAY SHARMA


DATE : 10.01.2023
CLASS : XII ‘B’

AISSCE ROLL NO : 12653959

Date:-

Signature of the student


CERTIFICATE

This is to certify that the project on “Store Management System” is


an orginal piece of work by Tanmay Sharma of class XII B and is
accordance with the topic allotted to him.

This project is submitted towards the partial fulfuilment of the


conditions laid down for AISSCE 2022-23 and embodies the work done
by him under my guidance and supervision.

Signature of Signature of
Internal Examiner External Examiner

Signature of Supervisor
ACKNOWLEDGEMENT

I would like to extend my gratitude towards my Computer


teacher, Geetanjali Hota Ma’am, for her able guidance and support in
completing my project. She was source of inspiration and my pillar of
strength through the course of this project.

I would also like to extend my gratitude to our honourable


principal, Dr. Sujata Sahu for providing me with all the facilities
required to complete the project.

Date:-

Signature of the student


CODING
import pickle

f=open("bookshop.dat","wb")

l1=[{"Name":"Mahabharata Quest","Author":"Christopher Doyle","Price":550,"Stock":18},{"Name":"Strange Case


of Dr Jekyll and Mr Hyde","Auhtor":"Robert Louis Stevenson","Price":300,"Stock":19},{"Name":"Khullam
Khulla","Author":"Rishi Kapoor","Price":521,"Stock":15},{"Name":"The English Teacher","Author":"RK
Narayan","Price":130,"Stock":30},{"Name":"The Secret","Author":"Rhonda
Byrne","Price":210,"Stock":21},{"Name":"The Shadow Lines","Author":"Amitav Ghosh","Price":140,"Stock":17}]

pickle.dump("The available books are:",f)

for i in l1:

pickle.dump(i,f)

f.close()

def display():

f=open("bookshop.dat","rb")

try:

while True:

s=pickle.load(f)

print(s)

except EOFError:

f.close()

def add():

f=open("bookshop.dat","ab")

d={}

name=input("Enter the name of the book you want to add:")

author=input("Entert the name of the author you want to add:")

price=int(input("Enter the price:"))

stock=int(input("Enter the stock of the book available:"))

d["Name"]=name
d["Author"]=author

d["Price"]=price

d["Stock"]=stock

l1.append(d)

pickle.dump(d,f)

print("Added succesfully")

f.close()

def order():

f=open("bookshop.dat","rb+")

a=input("Enter the name of the book you want:")

n=input("Enter your name:")

q=int(input("Enter the quantity:"))

d1={}

for i in l1:

if i["Name"]==a:

d1["Name of recipent:"]=n

d1["Book ordered:"]=a

p=i["Price"]

d1["Price"]=p

t=p*q

d1["Total Bill:"]=t

print("Your invoice:",d1)

i["Stock"]-=q

try:

while True:

rpos=f.tell()

s=pickle.load(f)
if type(s)==dict:

b=s["Name"]

if b==a:

s["Stock"]-=q

f.seek(rpos)

pickle.dump(s,f)

else:

continue

except EOFError:

f.close()

def delete():

a=input("Enter the name of the book you want to delete:")

f=open("bookshop.dat","wb")

for i in l1:

if i["Name"]==a:

l1.remove(i)

pickle.dump("The available books are:",f)

for j in l1:

pickle.dump(j,f)

print("Deleted Successfully")

def search():

f=open("bookshop.dat","rb")

u=input("Enter the details of the book you want to see:")

try:

while True:

s=pickle.load(f)

if type(s)==dict:
if s["Name"]==u:

print("The requested data is:")

print(s)

found=True

except EOFError:

if found==False:

print("Requested book is not available")

f.close()

l="\u0332".join("Welcome to the SAS BOOKSTORE")

print(" "*70,l," "*70)

while True:

print("*"*70)

print("Enter the adjacent number to do a required function")

print("1.Display")

print("2.Add")

print("3.Order")

print("4.Delete")

print("5.Search")

print("6.Exit")

choice=int(input("Enter your choice:"))

if choice==1:

display()

elif choice==2:

add()

elif choice==3:
order()

elif choice==4:

delete()

elif choice==5:

search()

else:

print("Thank you for visiting us")

break
OUTPUT
W̲e̲ l̲ c̲ o̲m̲e̲ ̲t̲o̲ t̲ ̲ h̲e̲ ̲S̲A̲S̲ B
̲ ̲ O̲O̲K̲S̲T̲O̲R̲E

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete

5.Search

6.Exit

Enter your choice:1

The available books are:

{'Name': 'Mahabharata Quest', 'Author': 'Christopher Doyle', 'Price': 550, 'Stock': 18}

{'Name': 'Strange Case of Dr Jekyll and Mr Hyde', 'Auhtor': 'Robert Louis Stevenson',
'Price': 300, 'Stock': 19}

{'Name': 'Khullam Khulla', 'Author': 'Rishi Kapoor', 'Price': 521, 'Stock': 15}

{'Name': 'The English Teacher', 'Author': 'RK Narayan', 'Price': 130, 'Stock': 30}

{'Name': 'The Secret', 'Author': 'Rhonda Byrne', 'Price': 210, 'Stock': 21}

{'Name': 'The Shadow Lines', 'Author': 'Amitav Ghosh', 'Price': 140, 'Stock': 17}

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order
4.Delete

5.Search

6.Exit

Enter your choice:2

Enter the name of the book you want to add:naruto shippuden

Entert the name of the author you want to add:Mamashi Kishimoto

Enter the price:175

Enter the stock of the book available:130

Added succesfully

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete

5.Search

6.Exit

Enter your choice:1

The available books are:

{'Name': 'Mahabharata Quest', 'Author': 'Christopher Doyle', 'Price': 550, 'Stock': 18}

{'Name': 'Strange Case of Dr Jekyll and Mr Hyde', 'Auhtor': 'Robert Louis Stevenson',
'Price': 300, 'Stock': 19}

{'Name': 'Khullam Khulla', 'Author': 'Rishi Kapoor', 'Price': 521, 'Stock': 15}

{'Name': 'The English Teacher', 'Author': 'RK Narayan', 'Price': 130, 'Stock': 30}
{'Name': 'The Secret', 'Author': 'Rhonda Byrne', 'Price': 210, 'Stock': 21}

{'Name': 'The Shadow Lines', 'Author': 'Amitav Ghosh', 'Price': 140, 'Stock': 17}

{'Name': 'naruto shippuden', 'Author': 'Mamashi Kishimoto', 'Price': 175, 'Stock': 130}

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete

5.Search

6.Exit

Enter your choice:3

Enter the name of the book you want:The Shadow Lines

Enter your name:SD

Enter the quantity:3

Your invoice: {'Name of recipent:': 'SD', 'Book ordered:': 'The Shadow Lines', 'Price':
140, 'Total Bill:': 420}

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete
5.Search

6.Exit

Enter your choice:1

The available books are:

{'Name': 'Mahabharata Quest', 'Author': 'Christopher Doyle', 'Price': 550, 'Stock': 18}

{'Name': 'Strange Case of Dr Jekyll and Mr Hyde', 'Auhtor': 'Robert Louis Stevenson',
'Price': 300, 'Stock': 19}

{'Name': 'Khullam Khulla', 'Author': 'Rishi Kapoor', 'Price': 521, 'Stock': 15}

{'Name': 'The English Teacher', 'Author': 'RK Narayan', 'Price': 130, 'Stock': 30}

{'Name': 'The Secret', 'Author': 'Rhonda Byrne', 'Price': 210, 'Stock': 21}

{'Name': 'The Shadow Lines', 'Author': 'Amitav Ghosh', 'Price': 140, 'Stock': 14}

{'Name': 'naruto shippuden', 'Author': 'Mamashi Kishimoto', 'Price': 175, 'Stock': 130}

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete

5.Search

6.Exit

Enter your choice:4

Enter the name of the book you want to delete:The Secret

Deleted Successfully
*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete

5.Search

6.Exit

Enter your choice:1

The available books are:

{'Name': 'Mahabharata Quest', 'Author': 'Christopher Doyle', 'Price': 550, 'Stock': 18}

{'Name': 'Strange Case of Dr Jekyll and Mr Hyde', 'Auhtor': 'Robert Louis Stevenson',
'Price': 300, 'Stock': 19}

{'Name': 'Khullam Khulla', 'Author': 'Rishi Kapoor', 'Price': 521, 'Stock': 15}

{'Name': 'The English Teacher', 'Author': 'RK Narayan', 'Price': 130, 'Stock': 30}

{'Name': 'The Shadow Lines', 'Author': 'Amitav Ghosh', 'Price': 140, 'Stock': 14}

{'Name': 'naruto shippuden', 'Author': 'Mamashi Kishimoto', 'Price': 175, 'Stock': 130}

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete
5.Search

6.Exit

Enter your choice:5

Enter the details of the book you want to see:naruto shippuden

The requested data is:

{'Name': 'naruto shippuden', 'Author': 'Mamashi Kishimoto', 'Price': 175, 'Stock': 130}

*********************************************************************
*

Enter the adjacent number to do a required function

1.Display

2.Add

3.Order

4.Delete

5.Search

6.Exit

Enter your choice:6

Thank you for visiting us


BIBLIOGRAPHY

1. www.google.com
2. Computer Science with Python by Sumita
Arora
3. www.geeksforgeeks.org

You might also like