CS Project Store Management Updated
CS Project Store Management Updated
SANPADA
Principal’s Signature:
School Stamp:
ACKNOWLEDGEMENT
3. Python Coding
5. References
AIM OF THE PROJECT
print("**************************************************************")
print("|||||*****WELCOME TO DARPAN ELECTRONICS*****|||||")
print("**************************************************************\n")
CD=[]
print("Let the registration begin!!")
Name=input("Enter your full name: ")
CD.append(Name)
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")
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 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 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 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 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("---------------------------")
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("---------------------------")
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")
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("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("***********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