0% found this document useful (0 votes)
35 views

CS Project Store Management Updated

c.s project on management for user

Uploaded by

proclement1209
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

CS Project Store Management Updated

c.s project on management for user

Uploaded by

proclement1209
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

RYAN INTERNATIONAL SCHOOL

SANPADA

COMPUTER SCIENCE PROJECT


STORE MANAGEMENT SYSTEM
UNDERTAKING

We declare that this project on the topic “Store


Management System” and the work presented in it is
created and submitted by me to the Computer Science
department of Ryan International School, Sanpada for the
partial fulfilment of the All India Senior Secondary
Certificate (AISSCE)
CERTIFICATE

This is to certify that Clement Daniel, student of class XII-C,


Ryan International School, Sanpada
I have successfully completed the project on the topic
“Store
Management System” under the guidance of Mrs. Janet
Lobo during the year 2024-25 in partial fulfilment of
Computer Science Practical examination of the Central
Board of Secondary Education. I certify this Project up to
my expectation & as per guidelines issued by
CBSE, NEW DELHI.

Signature of Internal Examiner:

Signature of External Examiner:

Principal’s Signature:

School Stamp:
ACKNOWLEDGEMENT

I would like to thank Principal Rajini Nair of Ryan


International School, Sanpada.
I would also like to extend our sincere gratitude to our
mentor Mrs.Janet Lobo.
I thank our school Ryan International School, Sanpada as
well as all its staff.
I also express thanks to CBSE for giving us the opportunity
to partake in this project.
Finally, we are deeply indebted to our parents who help us
every step of the way.
CONTENTS
1. Aim of the project

2. Introduction of the project

3. Python Coding

4. Output of the code

5. References
AIM OF THE PROJECT

Write a program that creates an interactive Store


Management System using Python and MY-SQL
connectivity.
INTRODUCTION OF THE PROJECT

This project is based on Store Management System. It


introduces and explains how a store could input the data of
all its customers and manage the data effectively.

This project primarily uses Python which is a computer


programming language that is often used to conduct data
analysis. Python is an interpreted, object-oriented, high-
level programming language. It can be used to create a
variety of different programs.

This project also utilises Pythons tools that allow it to access


data sources through Python and MySQL connectivity. We
can use SQL (Structured Query Language) to create, access,
and manipulate data. We can then efficiently integrate a
MySQL database with a Python application.
PYTHON CODING
import mysql.connector as sql
import time as t
mydb=sql.connect(host='localhost', user='root', passwd='abcd',
database='cs_project')
cursor=mydb.cursor()

print("**************************************************************")
print("|||||*****WELCOME TO DARPAN ELECTRONICS*****|||||")
print("**************************************************************\n")

CD=[]
print("Let the registration begin!!")
Name=input("Enter your full name: ")
CD.append(Name)

PhNo=int(input("Enter your 10-digit mobile number: "))


CD.append(PhNo)

Add=input("Enter your full address: ")


CD.append(Add)

Email=input("Enter your email id: ")


CD.append(Email)

print("Registration done successfully!")


print("----------------------------------------------------------")

itemnlist=[]
pricelist=[]
returnlist=[]
crntpricelist=[]
opt=0
while opt!=5:
print("")
print("**********HOMEPAGE***********")
print("")
print("We have the folllowing options:\n")
print("Press 1 - Purchase\nPress 2 - Return\nPress 3 - Repairs\nPress 4 - Go To
Cart\n")

opt=int(input("Enter Your Option: "))


if opt==1: #PURCHASE OPTION
print("You have selected Purchase\n")
pur=0

def purhelp(prange, cat, prnge):


print("Your price range is ", prange,"\n")
print("You have the following options:\n")
x=[cat, prnge]
cursor.execute("select UID, Product_name, Price from electronics_store
WHERE Category=%s AND Price_range=%s", x)
S=cursor.fetchall()
if len(S)==0:
print("Sorry! There are no products available right now!")
else:
for row in S:
print("UID Code:- ", row[0])
print("Product Name:- ", row[1])
print("Price of Product:- ", row[2])
print("-----------------------------")
itemn=input("Enter UID Code of product you want to buy: ")
for row in S:
if row[0]==itemn:
print("You have selected ", row[1],"of price",row[2],"\n")
itemnlist.append(row[1]) #to append product name
pricelist.append(row[2]) #to append price of product

while pur!=5:
print("We have the following options:\n")
print("Press 1 - Mobiles & Accessories\nPress 2 - Laptops &
Accessories\nPress 3 - Home Theatre\nPress 4 - Speakers & Audio\nPress 5 -
Homepage\n")
pur=int(input("Enter Your Option: "))
print()
if pur==1: #for mobiles & accessories
print("You have selected Mobiles & Accessories\n")
print("Please Select Your Price Range:\n")
print("Press 1 - under 20,000\nPress 2 - 20,000 to 35,000\nPress 3
- 35,000 to 50,000\nPress 4 - 50,000 and above\n")
p=int(input("Enter Your Option: ")) #price option
if p==1:
price="under 20,000"
purhelp(price, 1, 1)

if p==2:
price="20,000 to 35,000"
purhelp(price, 1, 2)
if p==3:
price="35,000 to 50,000"
purhelp(price, 1, 3)

if p==4:
price="50,000 and above"
purhelp(price, 1, 4)

if pur==2: # for laptops & accessories


print("You have selected Laptops & Accessories\n")
print("Please Select Your Price Range:\n")
print("Press 1 - under 20,000\nPress 2 - 20,000 to 35,000\nPress 3
- 35,000 to 50,000\nPress 4 - 50,000 and above\n")
p=int(input("Enter Your Option: ")) #price option
if p==1:
price="under 20,000"
purhelp(price, 2, 1)

if p==2:
price="20,000 to 35,000"
purhelp(price, 2, 2)

if p==3:
price="35,000 to 50,000"
purhelp(price, 2, 3)

if p==4:
price="50,000 and above"
purhelp(price, 2, 4)

if pur==3: #for Home Theatre


print("You have selected Home Theatre\n")
print("Please Select Your Price Range:\n")
print("Press 1 - under 20,000\nPress 2 - 20,000 to 35,000\nPress 3
- 35,000 to 50,000\nPress 4 - 50,000 and above\n")
p=int(input("Enter Your Option: ")) #price option
if p==1:
price="under 20,000"
purhelp(price, 3, 1)

if p==2:
price="20,000to 35,000"
purhelp(price, 3, 2)
if p==3:
price="35,000 and 50,000"
purhelp(price, 3, 3)

if p==4:
price="50,000 and above"
purhelp(price, 3, 4)

if pur==4: # for Speakers & Audio


print("You have selected Speakers & Audio\n")
print("Please Select Your Price Range:\n")
print("Press 1 - under 20,000\nPress 2 - 20,000 to 35,000\nPress 3
- 35,000 to 50,000\nPress 4 - 50,000 and above\n")
p=int(input("Enter Your Option: ")) # price option
if p==1:
price="under 20,000"
purhelp(price, 4, 1)

if p==2:
price="20,000 to 35,000"
purhelp(price, 4, 2)

if p==3:
price="35,000 to 50,000"
purhelp(price, 4, 3)

if p==4:
price="50,000 and above"
purhelp(price, 4, 4)

if pur==5:
break
#check itemlist
#check pricelist

continue

if opt==2: #RETURN OPTION


print("You have selected Return\n")
product="0"
while product!="5":
product=input("Select the product to be returned:\nPress 1 - Mobile\
nPress 2 - Laptop\nPress 3 - TV\nPress 4 - Speakers\nPress 5 - Exit Return")
print("")
if product=="1":
cursor.execute("select UID, Product_name, Price/2 as 'Current
Price' from electronics_store where Category=1;")
S=cursor.fetchall()
if len(S)==0:
print("Sorry! There are no products available right now!")
else:
for row in S:
print("UID Code:- ", row[0])
print("Product Name:- ", row[1])
print("Current Price:- ", row[2])
print("---------------------------")

returnuid=input("Enter the UID Codee of product you want to return:


")
for row in S:
if row[0]==returnuid:
print("You have selected ", row[1], "to return, whose
current price is",row[2],"\n")
returnlist.append(row[1]) #append name
crntpricelist.append(row[2]) #append current price
break
print("---------------------------")
print("Return Policy Charges is Rs 1000")
print("---------------------------\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")
print("Current Price of the product and our Return Policy charges
will be debited to your account on checkout.\n")

if product=="2":
cursor.execute("select UID, Product_name, Price/2 as 'Current
Price' from electronics_store where Category=2;")
S=cursor.fetchall()
if len(S)==0:
print("Sorry! There are no products available right now!")
else:
for row in S:
print("UID Code:- ", row[0])
print("Product Name:- ", row[1])
print("Current Price:- ", row[2])
print("---------------------------")

returnuid=input("Enter the UID Code of product you want to return:


")
for row in S:
if row[0]==returnuid:
print("You have selected ", row[1], "to return, whose
current price is",row[2],"\n")
returnlist.append(row[1]) #append name
crntpricelist.append(row[2]) #append current price
break
print("---------------------------")
print("Return Policy Charges is Rs 1000")
print("---------------------------\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")
print("Current Price of the product and our Return Policy charges
will be debited to your account on checkout.\n")

if product=="3":
cursor.execute("select UID, Product_name, Price/2 as 'Current
Price' from electronics_store where Category=3;")
S=cursor.fetchall()
if len(S)==0:
print("Sorry! There are no products available right now!")
else:
for row in S:
print("UID Code:- ", row[0])
print("Product Name:- ", row[1])
print("Current Price:- ", row[2])
print("---------------------------")

returnuid=input("Enter the UID Code of product you want to return:


")
for row in S:
if row[0]==returnuid:
print("You have selected ", row[1], "to return, whose
current price is",row[2],"\n")
returnlist.append(row[1]) #append name
crntpricelist.append(row[2]) #append current price
break
print("---------------------------")
print("Return Policy Charges is Rs 1000")
print("---------------------------\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")
print("Current Price of the product and Return Policy charges will
be debited to your account on checkout.\n")

if product=="4":
cursor.execute("select UID, Product_name, Price/2 as 'Current
Price' from electronics_store where Category=4;")
S=cursor.fetchall()
if len(S)==0:
print("Sorry! There are no products available right now!")
else:
for row in S:
print("UID Code:- ", row[0])
print("Product Name:- ", row[1])
print("Current Price:- ", row[2])
print("---------------------------")
returnuid=input("Enter the UID Code of product you want to return:
")
for row in S:
if row[0]==returnuid:
print("You have selected ", row[1], "to return, whose
current price is",row[2],"\n")
returnlist.append(row[1]) #append name
crntpricelist.append(row[2]) #append current price
break
print("---------------------------")
print("Return Policy Charges is Rs 1000")
print("---------------------------\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")
print("Current Price of the product and Return Policy charges will
be debited to your account on checkout.\n")

if opt==3: #REPAIRS
print("You have selected Repairs\n")
print("We have the following options: \n")
repair="0"
while repair!="6":
print("Press 1 - Mobile Repair\nPress 2 - Laptop Repair\nPress 3 - TV
Repair\nPress 4 - Audio Repair\nPress 5 - Other Repairs\nPress 6 - EXIT\n")
repair=input("Please Enter Your Choice: ")
if repair=="1": #mobile repair
print("You have selected Mobiles Repair")
detail=input("Please specify type of OS of mobile [Android, iOS,
Windows, BlackBerry, Other]: ")
print()

print("Repair charges will be subjective.\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")

if repair=="2": #laptop repair


print("You have selected Laptop Repair")
detail=input("Please specify type of OS of laptop [Microsoft
Windows, MacOS, Linux, Other]: ")
print()

print("Repair charges will be subjective.\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")

if repair=="3": #laptop repair


print("You have selected TV Repair")
detail=input("Please specify type of TV [QLED, OLED, LED, LCD,
Plasma]: ")
print()

print("Repair charges will be subjective.\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")

if repair=="4": #sound repair


print("You have selected Audio Devices Repair")
detail=input("Please specify type of audio device [Speakers,
Headphones, Sound card, Earphones]: ")
print()

print("Repair charges will be subjective.\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")

if repair=="5": #other repairs


print("You have selected Other Repairs.")
other=input("Please specify your device: ")
print()

print("Repair charges will be subjective.\n")

print("We have the following time slots: ")


print("Press 1 - Tuesday, 5PM to 7PM\nPress 2 - Thursday, 2PM to
4PM\nPress 3 - Sunday, 1PM to 3PM\n")
time=int(input("Please select the suitable slot: "))
if time==1:
print("The product will be picked from your residence on
Tuesday, between 5PM and 7PM\n")
if time==2:
print("The product will be picked from your residence on
Thursday, between 2PM to 4PM\n")
if time==3:
print("The product will be picked from your residence on
Sunday, between 1PM to 3PM\n")

if opt==4: #go to cart


print("------------Your Cart-----------\n")

print("Following are the items you wish to buy:") #to display your
products
S=itemnlist
lenpur=len(S)
for i in range(lenpur):
print(i+1, ".Item Name- ", itemnlist[i], "\n Item Price- ",
pricelist[i], "\n")
n=0 #to display total price of all products
for i in range(lenpur):
n=n+pricelist[i]
print("Total Price of all Products is ",n)

print("---------------------------------------------")

print("Following items are going to be returned:") #to display return


items
R=returnlist
lenreturn=len(returnlist)
for i in range(lenreturn):
print(i+1, ".Item Name- ", returnlist[i], "\n Item's Current Price-
", crntpricelist[i], "\n Item's Final Price(after Return Charges)- ",
crntpricelist[i]-1000)
m=0 #amt to be credited to customer's a/c
for i in range(lenreturn):
m=m+crntpricelist[i]
m=m-(1000*lenreturn)
print("Total Amount to be Credited to your Account is",m)
print("---------------------------------------------")

print("Your Grand Total is ",n-m)


print()
decision=int(input("Press 1 to go to transaction,\nPress 2 to go to
homepage"))
if decision==1:
break
else:
continue
print("How would you like to pay?")
payoption=int(input("Press 1 - Debit Card\nPress 2 - Credit Card\nPress 3 -
Cash/Cheque on Delivery"))
def pay():
bnkname=input("Please input your Bank Name: ")
dbcrdno=int(input("Please input your 12-digit Card Number: "))
print()
print("Verifying Details...Please Wait...\n")
t.sleep(3)
print("Card Verified")
psswd=int(input("Enter your Password: "))
print("Transaction Being Carried Out...Please Wait...")
t.sleep(3)
print()
print("Transaction Successful!\n")
if payoption==1:
pay()
if payoption==2:
pay()
if payoption==3:
print("Payment will be collected on delivery.")

print("***********YOUR BILL***********\n")
print("***********************************************************")
print(" |||||*****WELCOME TO DARPAN ELECTRONICS*****||||| ")
print("***********************************************************\n")
if lenpur!=0:
print(" Price Product Name")
for i in range(lenpur):
print(i+1,".", pricelist[i], itemnlist[i])
print(" ", n, " <--Total Price of Products")
print()
if lenreturn!=0:
print(" Final Price Product Name")
for i in range(lenreturn):
print(i+1,".", crntpricelist[i]-1000, " ", returnlist[i])
print(" ", m, " <--Total Amount to be Returned")
print()
print(" ", n-m, " <--Grand Total ")
print("Thank You, ", Name, " for shopping with us!")
print("Your Products will be delivered/picked up to/from the following address- ",
Add,"\n")
print("Have a nice day and keep shopping!")
OUTPUT
REFERENCES
1. Python.org

2. tutorialsPoint.com

3. en.wikipedia.org

4. Sumita Arora’s Book for CS Class XI

5. Sumita Arora’s Book for CS Class XII

You might also like