KK Docu Cs
KK Docu Cs
CERTIFICATE
`
CERTIFICATE
DATE PRINCIPAL
ACKNOWLEDGEMENT
`
ACKNOWLEDGEMENT
guiding and providing facilities towards the successful outcome of this project
work.
We wish to express our deep and profound sense of gratitude to our guide
We also express our sincere gratitude to one and all who directly or
CONTENTS
`
CONTENTS
1 AIM 1
2 2
INTRODUCTION TO PYTHON
3 INTRODUCTION TO PROJECT 4
4 REQUIREMENTS 5
5 PROJECT ANALYSIS 6
6 CODING 7
7 OUTPUT 16
8 SUGGESTED
IMPROVEMENTS 21
9 BIBLIOGRAPHY 22
`
AIM
`
AIM
1
`
INTRODUCTION TO PYTHON
BENEFITS OF PYTHON:
Python can connect to database systems. It can also read and modify files.
Python can be used to handle big data and perform complex mathematics.
Python has syntax that allows developers to write programs with fewer
lines than some other programming languages.
2
`
Python has syntax that allows developers to write programs with fewer
lines than some other programming languages.
Python was designed for readability, and has some similarities to the
English language with influence from mathematics.
3
`
INTRODUCTION:
This project MALL SYSTEM MANAGEMENT has been developed on Python and
MySQL. The main aim of this project is to manage all the details about
staff,purchase,sales,customer,store,product etc. Plus, we aim to reduce human effort.
4
`
REQUIREMENTS
HARDWARE REQUIRED:
Processor :PENTIUM(ANY)
RAM :512MB+
SOFTWARE REQUIRED:
Python
5
`
PROJECT ANALYSIS
➢ Database:
▪ mall
➢ Tables:
▪ purchase
▪ sales
▪ staff
▪ store
▪ product
6
`
CODINGS
import mysql.connector as m
def add_purchase():
id=int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
quantity = int(input("enter the quantity of the product"))
cur.execute("insert into purchase values({},'{}',{},{})".format(id, name, price,
quantity))
con.commit()
def update_purchase():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
quantity = int(input("enter the quantity of the product"))
cur.execute("insert into purchase values({},'{}',{},{})".format(id, name, price,
quantity))
con.commit()
def search_purchase():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
quantity = int(input("enter the quantity of the product"))
cur.execute("insert into purchase values({},'{}',{},{})".format(id, name, price,
quantity))
con.commit()
7
`
def display_purchase():
cur.execute("select * from purchase")
f = cur.fetchall()
print(f)
con.commit()
def add_sales():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
quantity = int(input("enter the quantity of the product"))
cur.execute("insert into sales values({},'{}',{},{})".format(id, name, price,
quantity))
con.commit()
def update_sales():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
quantity = int(input("enter the quantity of the product"))
cur.execute("insert into sales values({},'{}',{},{})".format(id, name, price,
quantity))
con.commit()
def display_sales():
cur.execute("select * from sales")
f = cur.fetchall()
print(f)
con.commit()
def add_products():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
sn=input("enter the store name in which product you want to add")
cur.execute("insert into products values({},'{}',{},'{}')".format(id, name, price, sn))
con.commit()
def update_products():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
sn=input("enter the store name in which product you want to add")
cur.execute("insert into products values({},'{}',{},'{}')".format(id, name, price, sn))
con.commit()
8
`
def search_products():
id = int(input("enter the id"))
name = input("enter the name")
price = int(input("enter the price of the product"))
sn=input("enter the store name in which product you want to add")
cur.execute("insert into products values({},'{}',{},'{}')".format(id, name, price, sn))
con.commit()
def display_products():
cur.execute("select * from products")
f = cur.fetchall()
print(f)
con.commit()
def add_stores():
id = int(input("enter the id"))
name = input("enter the name")
pn=input("enter the product which is selled in the store")
cur.execute("insert into stores values({},'{}','{}')".format(id, name, pn))
con.commit()
def update_stores():
id = int(input("enter the id"))
name = input("enter the name")
pn=input("enter the product which is selled in the store")
cur.execute("insert into stores values({},'{}','{}')".format(id, name, pn))
con.commit()
def search_stores():
id = int(input("enter the id"))
name = input("enter the name")
pn=input("enter the product which is selled in the store")
cur.execute("insert into stores values({},'{}','{}')".format(id, name, pn))
con.commit()
def display_stores():
cur.execute("select * from stores")
f = cur.fetchall()
print(f)
con.commit()
print("*" * 50)
print("MALL SYSTEM MANAGEMENT")
print("*" * 50)
print("1.purchase\n2.sales\n3.staff\n4.products\n5.stores\n")
choice1 = int(input("enter your choice”))
9
`
if choice1 == 1:
ch = "y"
while ch == "y":
print("1.add\n2.update\n3.search\n4.display\n")
choice2 = int(input("enter your choice"))
if choice2 == 1:
print("add purchase")
add_purchase()
elif choice2 == 2:
print("update")
update_purchase()
elif choice2 == 3:
print("search")
search_purchase()
elif choice2 == 4:
print("display")
display_purchase()
else:
print("OOPS WRONG OPTION")
ch = input("DO YOU WANT TO CONTINUE")
elif choice1 == 2:
print("sales")
ch = "y"
while ch == "y":
print("1.add\n2.update\n3.search\n4.display\n")
choice2 = int(input("enter your choice"))
if choice2 == 1:
print("add sales")
add_sales()
elif choice2 == 2:
print("update")
update_sales()
elif choice2 == 3:
print("search")
search_sales()
elif choice2 == 4:
print("display")
display_sales()
else:
print("OOPS WRONG OPTION")
ch = input("DO YOU WANT TO CONTINUE")
elif choice1 == 3:
print("staff")
ch = "y"
while ch == "y":
print("1.add\n2.update\n3.search\n4.display\n")
choice2 = int(input("enter your choice"))
10
`
if choice2 == 1:
print("add employee")
add_staff()
elif choice2 == 2:
print("update")
update_staff()
elif choice2 == 3:
print("search")
search_staff()
elif choice2 == 4:
print("display")
display_staff()
else:
print("OOPS WRONG OPTION")
ch = input("DO YOU WANT TO CONTINUE")
elif choice1 == 4:
print("products")
ch = "y"
while ch == "y":
print("1.add\n2.update\n3.search\n4.display\n")
choice2 = int(input("enter your choice"))
if choice2 == 1:
print("add products")
add_products()
elif choice2 == 2:
print("update")
update_products()
elif choice2 == 3:
print("search")
search_products()
elif choice2 == 4:
print("display")
display_products()
else:
print("OOPS WRONG OPTION")
ch = input("DO YOU WANT TO CONTINUE")
elif choice1 == 5:
print("stores")
ch = "y"
while ch == "y":
print("1.add\n2.update\n3.search\n4.display\n")
choice2 = int(input("enter your choice"))
if choice2 == 1:
print("add stores")
add_stores()
11
`
elif choice2 == 2:
print("update")
update_stores()
elif choice2 == 3:
print("search")
search_stores()
elif choice2 == 4:
print("display")
display_stores()
else:
print("OOPS WRONG OPTION")
ch = input("DO YOU WANT TO CONTINUE")
12
`
OUTPUT
13
`
14
`
15
`
16
`
17
`
18
`
19
`
20
`
21
`
22
`
23
`
24
`
SUGGESTED IMPROVEMENT
• Providing facilities to attach the tax added to the price of the products
• Notifications can also be sent to the users regarding the purchase and
• And to make the usage of the software at more ease and inclusion of
software experience.
25
`
BIBLIOGRAPHY
BOOKS REFERRED:
Website : https://www.python.org
26