Project File 8 Store Management
Project File 8 Store Management
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 <Your name here> of class XII
(STREAM) of <School name> has done his/her project on
<Project name > under my supervision. He / She 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, < Teacher name > who taught
and undertook the responsibility of teaching the subject
computer science. I have been greatly benefited from
his/her classes.
My sincere thanks goes to our Principal <Principal
name> who has always been a source of encouragement
and support and without whose inspiration, this project
would not have been a successful.
Finally, I would like to express my sincere appreciation
for all the other students for my batch their friendship &
the fine times that we all shared together.
Last but not least, I would like to thank all those who had
helped directly or indirectly towards the completion of
this project.
Name of student
Class
Introduction
Basic Store management system project in python is a
simple console application built without the use of
graphics. This project help us to search details of any
product like cost per product and quantity. In this project
we tried to enter all details of any product like cost and
available stock in store . And also tried to maintain all the
possibility which may help the user to all more stock user
requires.
Some of the features of the program are:
1) Store keeper can enter details of new product in
software.
2) User can sell any product.
3) After selling user can watch current available stock by
this system.
4) User can add more quantity of any product.
Source Code
import mysql.connector
mydb=mysql.connector.connect(host="localhost",us
er="root",
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()
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:
Website
http://python.mykvs.in/index.php
https://www.google.co.in/
THANK
YOU