J.P.
EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
Subject : Computer Science
Topic : Shopping Management System
SUBMITTED BY : UNDER SUPERVISION
OF:
Navneet Srivastava Mr. Raja Vishwakarma
Class : 12- A HOD/PGT(C.S.)
Roll No : 24
………………………………… ………………………………… …………………………………
Teacher’s Signature Examiner’s Signature Principal Signature
J.P.EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
Index
Sr. Date Title Pg. No
1 05/08/2022 Certificate
2 05/08/2022 Acknowledgment
3 05/08/2022 Preface
4 05/08/2022 Objective
5 05/08/2022 Source Code
6 05/08/2022 Output
7 05/08/2022 Bibliography
8 05/08/2022 Teacher’s Remark
J.P.EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
Certificate
Student’s Name : Navneet Srivastava
Std : 12
Division : A
Roll No : 24
This is to certify that given assignment
Has been performed by the student
Satisfactorily.
___________
Signature
ACKNOWLEDGEMEN
I express my heartiest and sincere thanks to my teacher
Mr . Raja Vishwakarma , who provide me their value able
time and information . This project could not have been
possible without their valuable support and guidance.
Their continuous support, effective encouragement and
patient have greatly eased my burden and made this
project possible.
It was a great opportunity for me to work on computer
project on the topic " Shopping Management System
”. Not to forget, all those who kept our spirits surging and
helped me in delivering my best.
Last but most important I thank ‘God Almighty’ who
guided me and be stored me with the wisdom and an
opportunity to carry out the project.
Regards:
Navneet Srivastava
Class- 12
J.P. Education Academy, 15-C Nathmalpur, Green City Road, Gorakhnath-
273015
PREFACE
Computer Learning has become an integral part of School Curriculum
The ever-refining face of technology has motivated the children to
become progressive learners in this field.
e-connect is a graded series of computer for classes 9 to 12. The
distinguishing features of this series is its Active learning approach.
Each chapter includes step-by-step visual representation of the process
involved in performing different tasks, solved project for extra practice
and quiz and activities to facilitate on the spot assessment.
Salient features of the series:
The series incorporates a total visual and activity based approach
for better understanding of steps involved in activities.
The chapters are supplemented with plentiful illustrations and
diagrams.
Sufficient number of activities with in chapter, Group Discussions,
Project Works. Life Skills and HOTS supplement the knowledge
through the chapter.
Activity Section of every lesson provides an integrated approach
to learning and adds value to the long term growth of a student.
Group Discussion Section helps the students to develop
communication and analytical skills.
Project Works are given along with guidelines to enhance the
creativity of students.
We welcome your suggestions for improvement of these books and
would like to incorporate them in the subsequent editions.
-Publishers
J.P. Education Academy, 15-C Nathmalpur, Green City Road, Gorakhnath-
273015
J.P.EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
*****************************
Source
Code
*****************************
Regards:
Navneet Srivastava
Class- 12
J.P. Education Academy, 15-C Nathmalpur, Green City Road, Gorakhnath-
273015
shopping = [{"id": 1001, "Name": "HP-AE12", "Available": 100, "Price":
25000, "Original_Price": 24000},
{"id": 1002, "Name": "DELL", "Available": 100, "Price": 35000,
"Original_Price": 34000},
{"id": 1003, "Name": "ASUS", "Available": 100, "Price": 28000,
"Original_Price": 27000},
{"id": 1004, "Name": "APPLE", "Available": 100, "Price":
60000, "Original_Price": 59000},
{"id": 1005, "Name": "ACER", "Available": 100, "Price": 24000,
"Original_Price": 23000},
{"id": 1006, "Name": "SAMSUNG", "Available": 100, "Price":
35000, "Original_Price": 34000},
{"id": 1007, "Name": "OPPO", "Available": 100, "Price": 15000,
"Original_Price": 14000},
{"id": 1008, "Name": "XAOMI", "Available": 100, "Price":
45000, "Original_Price": 44000},
{"id": 1009, "Name": "HUAWEI", "Available": 100, "Price":
20000, "Original_Price": 19000},
{"id": 1010, "Name": "VIVO", "Available": 100, "Price": 12000,
"Original_Price": 11000}]
shopping1 = shopping
temp = []
order = ""
def adminLoginWindow():
print("=====================")
print("1.Display Menu")
print("2.Add Product")
print("3.Remove Product")
print("4.Products goods available")
print("5.Total Income")
print("6.Logout")
print("=====================")
def adminDisplayMenuWindow():
print("Id\tName\tAvailable\tPrice\tOriginal Price")
print("====================================================")
for d in shopping:
print(f'{d["id"]}\t{d["Name"]}\t{d["Available"]}\t\t{d["Price"]}\
t{d["Original_Price"]}')
def addproducts():
n = int(input("Enter the no.of.items need to be added : "))
for i in range(n):
new_id = int(input("Enter id : "))
new_Name = input("Enter Name : ")
new_Available = int(input("Enter Available : "))
new_Price = int(input("Enter Price : "))
new_original = int(input("Enter the original price : "))
d = [{"id": new_id, "Name": new_Name, "Available": new_Available,
"Price": new_Price,
"Original_Price": new_original}]
shopping.extend(d)
adminDisplayMenuWindow()
def removeproducts():
dressId = int(input("Enter the id need to be deleted : "))
found = False
for d in shopping1:
found = d["id"] == dressId
if found != True:
temp.append(d)
continue
if found == True:
d["Available"] -= 1
print("Deleting item....")
if len(temp) == d:
print(f"{dressId} not found")
else:
print(f"{dressId}'s one available is removed from the list")
adminDisplayMenuWindow()
def availableproducts():
Total = 0
print("\n")
for d in shopping:
print(f'{d["Name"]} = {d["Available"]}')
Total += (d["Available"])
print("\nTotal available goods is : ", Total)
def monthlyincome():
total = 0
for d in shopping:
total += ((d["Available"] * d["Price"]) - (d["Available"] *
d["Original_Price"]))
print("\nTotal income is : ", total)
def logoutwindow():
login()
def adminOptions():
choice = int(input("Please enter user choice : "))
if choice == 1:
adminDisplayMenuWindow()
print("\n===================================================\n")
adminLoginWindow()
print("\n===================================================\n")
adminOptions()
elif choice == 2:
adminDisplayMenuWindow()
print("\n===================================================\n")
addproducts()
print("\n===================================================\n")
adminLoginWindow()
print("\n===================================================\n")
adminOptions()
elif choice == 3:
adminDisplayMenuWindow()
print("\n===================================================\n")
removeproducts()
print("\n===================================================\n")
adminLoginWindow()
print("\n===================================================\n")
adminOptions()
elif choice == 4:
availableproducts()
print("\n===================================================\n")
adminLoginWindow()
print("\n===================================================\n")
adminOptions()
elif choice == 5:
monthlyincome()
print("\n===================================================\n")
adminLoginWindow()
print("\n===================================================\n")
adminOptions()
elif choice == 6:
logoutwindow()
else:
print("\nInvalid Choice. Please enter valid choice")
print("\n===================================================\n")
adminLoginWindow()
print("\n===================================================\n")
adminOptions()
def userLoginWindow():
print("=====================\n")
print("1.Display Menu")
print("2.Place order")
print("3.Cancel order")
print("4.Logout")
print("\n======================")
def userDisplayMenuWindow():
print("Id\tName\tAvailable\tPrice")
print("===================================================")
for d in shopping:
print(f'{d["id"]}\t{d["Name"]}\t{d["Available"]}\t\t{d["Price"]}')
def user_id():
userDisplayMenuWindow()
p_id = int(input("\nEnter the id : "))
def placeOrder():
order_number = 10
userDisplayMenuWindow()
p_id = int(input("\nEnter the id : "))
for d in shopping:
if d["id"] == p_id:
print("\nId\tName\tAvailable\tPrice")
print("=============================================================")
print(f'{d["id"]}\t{d["Name"]}\t{d["Available"]}\t\
t{d["Price"]}')
order = '{d["id"]}\t{d["Name"]}\t{d["Available"]}\t\
t{d["Price"]}'
conform = input("\nDo you want to place an order on the above
shown product : Y/N ")
if conform == 'Y' or conform == 'y':
print("\nSuccessfully placed the order on the product {}
{}".format(d["id"], d["Name"]))
order_number += 1
print("Your order number is : ", order_number)
d["Available"] -= 1
break
elif conform == 'N' or conform == 'n':
print("The order is not placed. You can carry on with you
purchase. Happy shopping!!!!")
break
else:
print("\nYou have entered wrong option. Please enter
again\n")
conform = input("\nDo you want to place an order on the
above shown product : Y/N ")
break
if d["id"] != p_id:
print("\nYou have entered invalid id. Please enter valid id\n")
user_id()
print("\nAvailable products : \n")
userDisplayMenuWindow()
def cancelOrder():
found = False
temp = []
order_id = input("Enter the order id : ")
for d in shopping:
found = d["id"] == order_id
if found != True:
temp.append(d)
if len(temp) == d:
print(f'{order_id} is not found')
else:
print(f'{order_id} is removed from the placed order')
def userChoiceOptions():
choice = int(input("Please enter user choice : "))
if choice == 1:
userDisplayMenuWindow()
print("\n===================================================\n")
userLoginWindow()
print("\n===================================================\n")
userChoiceOptions()
elif choice == 2:
placeOrder()
print("\n===================================================\n")
userLoginWindow()
print("\n===================================================\n")
userChoiceOptions()
elif choice == 3:
cancelOrder()
print("\n===================================================\n")
userLoginWindow()
print("\n===================================================\n")
userChoiceOptions()
elif choice == 4:
logoutwindow()
else:
print("Invalid Choice. Please enter valid choice")
def login():
print("\n")
print("****"*15)
print("\n")
print(" "*12 , "PACIFIC") #company name
print("\n")
print("****"*15)
print("\n")
print('''
---- Login Admin/Login User ----
[Type A to Login in the Admin/ Type U to Login in the User]
''')
i="i"
while (i!="A" and i!="U"):
i=str(input("=>"))
i=i.upper()
if (i!="A" and i!="U"):
print("[Type A to Login in the Admin/ Type U to Login in the
User]")
else:
pass
if i == 'A' or i == 'a':
password = input("Enter the password : ")
if password == "******": #change password
adminLoginWindow()
adminOptions()
else:
print("Invalid password. Please enter valid password")
elif i == 'U' or i == 'u':
name = input ("Enter Your Name : ")
mobile = input ("Enter Your Mobile Number : ")
email = input ("Enter Your EMAIL : ")
password = input("Enter the Password : ")
password1="g"
while password1!=password:
password1 = input("Enter again Password : ")
if password1!=(password1!=password):
print("Re-Enter Password")
userLoginWindow()
userChoiceOptions()
else:
pass
if (password == password1):
print("===="*15)
print("\n")
print (" "*11 ,"CONGRATULATION LOGIN ID IS SUCCESFULL")
#message of congratulation
print("\n")
print("===="*15)
else:
print("Invalid password. Please enter valid password")
login()
J.P.EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
*****************************
Output
*****************************
Regards:
Navneet Srivastava
Class- 12
J.P. Education Academy, 15-C Nathmalpur, Green City Road, Gorakhnath-
273015
INTRODUCTION
LOGIN ADMINISTRATOR
DISPLAY MENU
ADD PRODUCT
PRODUCT IS ADDED
PRODUCTS GOOD AVAILABLE
TOTAL INCOME
LOGOUT
J.P.EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
Bibliography
1. Help from Teachers.
2. Help from Books:
Referenced from Computer book.
-Sumita Arora
Reference from Computer NCERT.
3. Help from Internet.
Regards:
Navneet Srivastava
Class- 12
J.P. Education Academy, 15-C Nathmalpur, Green City Road, Gorakhnath-
273015
J.P.EDUCATION ACADEMY
Affiliated to C.B.S.E. Board, New Delhi (10+2) Aff.No 2131159
15-C, Nathmalpur, Green City Road, Gorakhnath, Gorakhpur 273015
Live To Learn & Learn To Live
TEACHER’s REMARKS
Regards:
Navneet Srivastava
Class- 12
J.P. Education Academy, 15-C Nathmalpur, Green City Road, Gorakhnath-
273015