Project File 8 Store Management PDF
Project File 8 Store Management PDF
Kalyanpur
Session 2024-2025
Computer Science Project File
Submitted To: Submitted By:
Subject Teacher Name-
Class-
PROJECT BASED ON
Basic
Store management
System
Index
S No. Content Page No.
1) Certificate 4
2) Acknowledgement 5
3) Introduction 6
4) Source Code 7
5) Output Window 11
6) Bibliography 15
CERTIFICATE
This is to certify that Satyam Singh of class XII (Science) of
Gardenia Public School has done his project on
Semiconductor and Diodes under my supervision. He has
taken interest and has shown at most sincerity in
completion of this project. I certify this Project up to my
expectation & as per guidelines issued by CBSE, NEW DELHI.
Internal Examiner
External Examiner
Acknowledgement
It is with pleasure that I acknowledge my sincere gratitude
to our teacher, Mr. DS. Chauhan Sir who taught and
undertook the responsibility of teaching the subject
Physics. I have been greatly benefited from his classes.
password="123456",database="inventory")
def enter():
mycursor=mydb.cursor()
y="y"
while y=="y":
nm=input("Enter name:")
code=input("Enter Product code:")
quantity=int(input("Enter quantity:"))
cost=int(input("Enter cost per
product:"))
mycursor.execute("insert into
product(pname,pcode,quantity,cost)
values('{}','{}',{},{})".format(nm,code,quantity
,cost))
mydb.commit()
print(mycursor.rowcount,"Record
Inserted")
y=input("Do you want to insert more
data:")
main()
def sell():
mycursor=mydb.cursor()
nm=input("Product to sell:")
qu=input("Quantity:")
mycursor.execute("update product set
quantity=quantity-{} where
pname='{}'".format(qu,nm))
mydb.commit()
print("Total number of rows
affected",mycursor.rowcount)
main()
def search():
mycursor=mydb.cursor()
nm=input("Enter name of product to be
search:")
mycursor.execute("select * from product
where pname='{}'".format(nm))
myrecords=mycursor.fetchall()
print("Name \t\t Product code \t\t Quantity
\t\t Cost")
for i in myrecords:
print(i[1],'\t\t',i[2],'\t\t',i[3],'\t\t',i[4])
print("Total number of rows
retrieved",mycursor.rowcount)
main()
def addmore():
mycursor=mydb.cursor()
nm=input("Product to Add:")
qu=int(input("Quantity:"))
mycursor.execute("update product set
quantity=quantity+{} where
pname='{}'".format(qu,nm))
mydb.commit()
print("Total number of rows
affected",mycursor.rowcount)
main()
def alldata():
mycursor=mydb.cursor()
print(i[1],'\t\t',i[2],'\t\t',i[3],'\t\t',i[4])
print("Total number of rows
retrieved",mycursor.rowcount)
main()
def main():
print("Main menu-Store Management System")
print("1. Enter product in store\n2. Search
any product\n3. Sell product\n4. Add more
quantity \n5. Show all product")
ch=int(input("Enter your Choice:"))
if ch==1:
enter()
elif ch==2:
search()
elif ch==3:
sell()
elif ch==4:
addmore()
elif ch==5:
alldata()
else:
print("Enter correct choice")
main()
main()
Output:
Main menu:
Book Name
Preeti Arora
Website
http://python.mykvs.in/index.php
https://www.google.co.in/