0% found this document useful (0 votes)
8 views13 pages

Adobe Scan 05 Dec 2024 Computer Project

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

Adobe Scan 05 Dec 2024 Computer Project

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

Gardenia Public School

Kalyanpur

Dedicateb Cated to Ercellenee

Session 2024-2025
Computer Science Project File
Submitted To: Submitted By:
Mr. Govind Rathore Sir Name-Mahendra Singh
Class-XII
PROJECT BASED ON
Basic

Inventory
management system
Index
S No. Content Page No.
1) Certificate 4
2) Acknowledgement 5
3) Introduction 6
4) Source Code o7
5) Output Window 10
6) Bibliography 13
CERTIFICATE
This is to certify that Mahendra Singh of class XIl
(Science) of Gardenia Public School has done his
project on Basis Inventory management system
under my supervision. He has taken interest and has
shown at most sincerity in completion of this project.
Icertify 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. Govind Sir who taught
and undertook the responsibility of teaching the
subject computer science. I have been greatly
benefited from his classes.

My sincere thanks goes to our Principal Mr.Jaideep


dixit 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, Iwould like to thank all those who
had helped directly or indirectly towards the
completion of this projec.
Name of student
Class
Introduction
Basic inventory 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. And also
tried to maintain all the possibility which may help
the user to all more stock user requres.
Some of the features of the program are:
1) User can see list of all available inventory.
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",user="root",
password="123456",database="inventory")

def sell):
mycursor=mydb.cursor()
nm=input("Product to sell:")
qu=input(Quantity:")
mycursor.execute('update product set quantity=quantity-o
where pname=".format(qu,nm))
mydb.commit()
print("Total number of rows affected",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()

mycursor.execute("Select * from product")


myrecords=mycursor.fetchall()
print("Name \t\t Product code \t\t Quantity \t\t Cost")
for iin myrecords:
print(i[1].\t\ti[2],\t\ti(3].\t\t"l4)
print("Total number of rowS retrieved",mycursor.rowcount)
main)

def main0:
print('Inventory Management System: Main menu")
print("1. Show all product\n2. Sell product\n3. Add more
quantity ")
ch=int(input('Enter your Choice:")
if ch==1:
alldata)
elif ch==2:
sell)
elif ch==3:
addmore()
else:
print("Enter correct choice")
main)
main)
Output:
Main menu:

Inventory Management System: Main menu


Show all product
2. Sell product
B. Add more quantity
Enteryour Choice:1

Press 1to show all available products:


tnventory Management System: Mainmenu
1. Show all product
2. Sell product
B. Add more quantity
Enter your Choice:1
Name Product code Quantity Cost
colgate colg 25 30
dettol shop dtsh 38 1
lay chips lchp 50 5
Total number of rows retrieved 3

Press 2 to sellany product:


Inventory Management System: Main menu
1. Show all product
2. Sell product
3. Add more quantity
Enter your Choice : 2
Product to sell: colgate
Quantity:3
Total number of rows affected 1

Press 1 again to check available stock after selling:


Inventory Management System: Main menu
1. Show all product
2. Sell product
3. Add more quantity
Enter your Choice:1
dame Product code Quantity COst
colgate colg 22 3e
dettolshop dtsh 38 10
lay chips lchp 50 5
Total numberof rows retrieved 3
Press 3 to show allrecords:
Inventory Management System: Main menu
1. Show all product
2. Sell product
3. Addmore quantity
Enter your Choice:3
Product to Add: colgate
Quantity:20
Total number of rows affected 1

Press 1 again to check available stock after selling:


Inventory Management System: Main menu
1. Show all product
2. Sell product
B. Add more quantity
Enter your Choice:1
Name Product code Quantity Cost
colgate colg 42 30
dettol shop dtsh 38 10
lay chips lchp 5 5
Total number of rows retrieved 3
Tables in database
my sql> desc product;
t--- ---1t--
Field Type Null | Key Default Extra

pno int NO PRI NULL auto increment


varchar(30) YES NULL
pcode char(4) YES NULL
quantity int YES NULL
cost int YES NULI
-+
5 rows in set (0.01 sec)

mysql> desc sell;

Field | Type | Null | Key | Default | Extra


+ -+- ----+---- --+---- ----+

int NO | PRI NULL auto_increment


pno int YES NULL
pname varchar(30) YES NULL
quantity int YES NULL
cost int YES NULL
bno int YES NULL

6 rows in set (0.00 sec)


Bibliography
Book Name
Preeti Arora

Website
http://python.mykvs.in/index.php

https://www.google.co.in/

THANK
YOU

You might also like