CSProject
CSProject
INTRODUCTION TO PYTHON
PROJECT ON ICE CREAM SHOP MANAGMENT
SYSTEM
OBJECTIVES OF THE PROJECT
HARDWARE AND SOFTWARE
REQUIREMENTS
PROPOSED SYSTEM
BACKEND DETAILS
WORKING DESCRIPTION
SOURCE CODE
SCREEN SHOTS OF EXECUTION
SCOPE AND LIMITATION
BIBLIOGRAPHY
INTRODUCTION TO PYTHON
Python is an interpreter, object-oriented, high-level
programming language with dynamic semantics. Its high-level
built in data structures, combined with dynamic typing and
dynamic binding; make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language
to connect existing components together. Python's simple, easy
to learn syntax emphasizes readability and therefore reduces the
cost of program maintenance. Python supports modules and
packages, which encourages program modularity and code
reuse. The Python interpreter and the extensive standard library
are available in source or binary form without charge for all
major platforms, and can be freely distributed.
History of Python:
INTRODUCTION:
Icecream shop management system is a software for icecream shop owners. It
contains all the flavours of ice cream, toppings and their respective prices. Every
customer is issued an order number and the menu is displayed to the customer.
The menu contains all the flavours of icecream and toppings, their respective
prices and a serial number is issued for every item. The customer can enter their
name and the serial number of the item to place their order.
The customer's order is managed by storing their order number, name, ice cream
flavour, toppings chosen and the total amount of their order. The customer can
also modify their order, First the customer's details i.e., order number and name
of the customer is received, then the menu is displayed once again and the
customer can place their new order again. The customer can also cancel their
order by entering their details. The customer can also view their total amount to
be paid for their order by giving their details. Through this software, the owners
can easily manage the orders of their customers
OBJECTIVES OF THE PROJECT:
RAM : 512MB+
SOFTWARE REQUIREMENTS:
Windows 10
My-SQL server 5.5 or higher(as backend)
Python idle 3.6 or higher or spyder (as frontend).
Microsoft Word 2010 or higher for documentation.
PROPOSED SYSTEM:
import mysql.connector
import random
db=mysql.connector.connect(user='root',password='vaibhusql',host='localhost')
cur=db.cursor()
'''sql="create database Frozen_Scoop_"
cur.execute(sql)
print("DATABASE CREATED SUCCESSFULLY!")
print()'''
import mysql.connector
db=mysql.connector.connect(user='root',password='vaibhusql',host='localhost',d
atabase="Frozen_Scoop_")
cur=db.cursor()
'''a="create table ice_cream_flavours(Sno int, Ice_cream Varchar(25), Price
int)"
cur.execute(a)
a="insert into ice_cream_flavours values(1,'Vanilla',25)"
cur.execute(a)
a="insert into ice_cream_flavours values(2,'Strawberry',30)"
cur.execute(a)
a="insert into ice_cream_flavours values(3,'Butterscotch',30)"
cur.execute(a)
a="insert into ice_cream_flavours values(4,'Black current',30)"
cur.execute(a)
a="insert into ice_cream_flavours values(5,'Chocolate',35)"
cur.execute(a)
a="create table toppings(Sno int, topping Varchar(25), Price int)"
cur.execute(a)
a="insert into toppings values(1,'Strawberry syrup',20)"
cur.execute(a)
a="insert into toppings values(2,'Chocochip',25)"
cur.execute(a)
a="insert into toppings values(3,'Rainbow sprinkles',25)"
cur.execute(a)
a="insert into toppings values(4,'Cherry',30)"
cur.execute(a)
a="insert into toppings values(5,'Whipping cream',35)"
cur.execute(a)
b="create table Cust_details(Order_no int,Name Varchar(25),Ice_cream
Varchar(25),Toppings varchar(25),Amount int)"
cur.execute(b)
print("ALL TABLES CREATED SUCCESSFULLY!")
print()'''
def cust_details():
no=random.randint(1,1000)
print("Your order no is",no)
name=input("Enter your name:")
print()
ic,top,amt=order()
a="insert into
Cust_details(Order_no,Name,Ice_cream,Toppings,Amount)values(%s,%s,%s,%
s,%s)"
details=(no,name,ic,top,amt)
cur.execute(a,details)
db.commit()
print("Your ice_cream order is placed successfully!")
def order():
icf=''
t=''
tot_amt=0
s="select * from ice_cream_flavours"
cur.execute(s)
fl=cur.fetchall()
print("We have the following ice cream flavours:\n")
for i in fl:
print(i)
a=int(input("Enter s.no of the item to place the order:"))
for i in fl:
if a==i[0]:
icf=i[1]
ic_amt=i[2]
s="select * from toppings"
cur.execute(s)
fl=cur.fetchall()
print()
print("We have the following toppings:\n")
for i in fl:
print(i)
a=int(input("Enter s.no of the item to place the order:"))
for i in fl:
if a==i[0]:
t=i[1]
t_amt=i[2]
tot_amt=ic_amt+t_amt
print("Your Order Summary :")
print("Ice cream flavour","Topping")
print(icf,"\t",t,"\t")
print()
return icf,t,tot_amt
def modify():
name=input("Enter your name:")
no=int(input("Enter order no"))
a,b,c=order()
sql="update Cust_details set Ice_cream=%s where Name=%s and
Order_no=%s"
upd=(a,name,no)
cur.execute(sql,upd)
db.commit()
sql="update Cust_details set Toppings =%s where Name=%s and
Order_no=%s"
upd=(b,name,no)
cur.execute(sql,upd)
db.commit()
sql="update Cust_details set Amount =%s where Name=%s and
Order_no=%s"
upd=(c,name,no)
cur.execute(sql,upd)
db.commit()
print("Your order is changed successfully!")
print()
def amount():
name=input("Enter your name:")
no=int(input("Enter order no"))
s="select * from Cust_details"
cur.execute(s)
a=cur.fetchall()
for i in a:
if i[0]==no and i[1]==name:
print("The amount to be paid is: Rs.",i[4])
print()
def cancel():
name=input("Enter your name:")
no=int(input("Enter order no"))
sql="Delete from Cust_details where Name=%s and Order_no=%s"
user=(name,no)
cur.execute(sql,user)
db.commit()
print("Your order is cancelled successfully!")
print()
print("*******************************************************
WELCOME TO FROZEN_SCOOP_
*************************************************")
print()
def MENU():
print("Enter 1: To order icecream")
print("Enter 2: To Modify your order")
print("Enter 3: To view the amount to be paid")
print("Enter 4: To Cancel your order")
a=int(input("Enter your choice:"))
if a==1:
cust_details()
if a==2:
modify()
if a==3:
amount()
if a==4:
cancel()
MENU()
ans='y'
while ans=='y':
ans=input("Do you want to do any other operations?(y/n)")
if ans=='y':
MENU()
print("******************************************************
THANKYOU :)
**************************************************************")
SCREEN SHOTS OF EXECUTION
1. DATABASE AND TABLE CREATION:
2. TAKING ORDERS:
3. MODIFYING ORDER:
4. IEWING AMOUNT:
5. CANCELLATION OF ORDER:
SCOPE OF IMPROVEMENT
Although this is a basic outline project it can be improved in many
ways for efficient use. The project can be improved by improvising
many new modules and adding more data.
Some of the improvements ideas are:
The customer can be asked to give feedback and ratings of their
order.
Allocation of seats can be done while placing the order.
Serving of bases like cups and cones can be done by the
customer
LIMITATIONS
Online transactions for orders are not possible.
The customer cannot place order with many scoops of ice cream
as they wish.
Without order number the customer cannot cancel or modify
their order.
BIBLIOGRAPHY
BOOKS:
WEBSITES:
i. https://www.w3schools.com/python/
ii. www.geeksforgeeks.org
iii. https://docs.python.org/3/