0% found this document useful (0 votes)
20 views12 pages

System of A Supermarket

The document outlines the creation of a supermarket billing system using Python, detailing its functionality and benefits for managing supermarket operations. It includes code snippets for the graphical user interface and calculations for item costs, taxes, and totals. The system aims to enhance programming skills while providing practical application in retail management.

Uploaded by

teamyara37
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views12 pages

System of A Supermarket

The document outlines the creation of a supermarket billing system using Python, detailing its functionality and benefits for managing supermarket operations. It includes code snippets for the graphical user interface and calculations for item costs, taxes, and totals. The system aims to enhance programming skills while providing practical application in retail management.

Uploaded by

teamyara37
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

System of a

Supermarket
Understanding how to create a billing retail system for a supermarket
using Python
Table of contents

1 2
Introduction Presentation
What is the system of a The code to a system of a
supermarket
supermarket ? and how is it
helpful ?

3
Breaking down
the code
Breaking down the code into
smaller parts
We need to divide the content →

What is the System


How is it helpful?
of a Supermarket?
The system of a Creating such program
Supermarket is created can help build computer
using python to easily skills as can be helpful
manage all supermarket for future reference.
related functions by a
single user. Functions
such as listing chosen
items, creating the bill,
and purchasing said
items
from tkinter import *
Import random
Import time

Root = Tk()
root.geometry("900×580+0+0+0")
root.title("SYSTEM OF A SUPERMARKET")

Tops = Frame (root, bg="white"), width=1600, height=50, relif=SUNKEN


Tops.pack (side=TOP)

F1 = Frame (root, width=900, height=700, relif=SUNKEN)


f1.pack (side=LEFT)

F2 = Frame (root, width=400, height=700, reilf=SUNKEN)


f2.pack (side=RIGHT)

Localtime = time.asctime(time.localtime (time.time()))4:


lblinfo = Label (Tops, font=("aria", 30, "bold"), text="SYSTEM OF A SUPERMARKET", fg="black", bd=10,
anchor="w")
IbIinfo.grid(row=0, column=0)

Iblinfo = Label (Tops, font=("aria", 20, text=localtime, fg="black", anchor="w")


Iblinfo.grid(row=1, column=0)

Def Ref ():


X= random.randint (12980, 50876)
randomRef = str(x)
rand.set (randomRef)
coc = float (Chips.get())
cob = float (Bread.get())
coch = float (Cheese.get())
coora = float (Orange_juice.get())
cor = float (Rice.get())
com = float (Meat.get())

costofchips = coc*5
costofbread = cob*3
costofcheese = coch*10
costoforangejuice = coora*15
costofrice = cor*5
costofmeat = com*20

costofTotalItems = "Rs.", str( "%.2f" % (costofchips + costofbread + costofcheese + costoforangejuice


+ costofrice + costofmeat))
PayTax = ((costofchips + costofbread + costofcheese + costoforangejuice + costofrice +
costofmeat)*0.33)
Totalcost = (costofchips + costofbread + costofcheese + costoforangejuice + costofrice +
costofmeat)

OverAllCosts = "Rs.", str(PayTax+TotalCost)


PaidTax = "Rs.", str("%.2f" % PayTax)

Cost.set (costofTotalItems)
Tax.set (Paidtax)
Subtotal.set ( costofTotalItems)
Total.set (OverAllCost)
Def qexit ():
root.destroy()

Def reset ():


rand.set ("") Rand = StringVar()
Chips.set ("") Chips = StringVar()
Bread.set ("") Bread = StringVar()
Cheese.set("") Cheese = StringVar()
Orange_juice.set("") Orange_juice = StringVar()
Subtotal.set("") Subtotal = StringVar()
Total.set("") Total = StringVar()
Rice.set("") Rice = StringVar()
Tax.set("") Tax = StringVar()
Cost.set("") Cost = StringVar()
Meat.set("") Meat = StringVar
IblChips = Label (fl, font = ("aria", 16, "bold"), text= "Chips" , fg="blue", bd=10, anchor="w")
IblChips.grid (row=1, column=1)
TxtChips = Entry (fl, font = ("Arial", 16, "bold"), textvariable = Chips, bd=6, insertwidth=4, justify="right")
textChips.grid (row=1, column=1)

IblBread = Label (fl, font = ("aria", 16, "bold"), text= "Bread" , fg="blue", bd=10,
anchor="w")
IblBread.grid (row=2, column=1)
TxtBread = Entry (fl, font = ("Arial", 16, "bold"), textvariable = Bread, bd=6,
insertwidth=4, justify="right")
TxtBread.grid (row=2, column=1)
IblCheese = Label (fl, font = ("aria", 16, "bold"), text= "Cheese" , fg="blue", bd=10, anchor="w")
IblCheese.grid (row=3, column=1)
TxtCheese = Entry (fl, font = ("Arial", 16, "bold"), textvariable = Cheese, bd=6, insertwidth=4,
justify="right")
txtCheese.grid (row=3, column=1)

IblOrange_juice = Label (fl, font = ("aria", 16, "bold"), text= "Orange juice" , fg="blue", bd=10,
anchor="w")
IblOrange_juice.grid (row=4, column=1)
TxtOrange_juice = Entry (fl, font = ("Arial", 16, "bold"), textvariable = Orange juice, bd=6,
insertwidth=4, justify="right")
txtOrange_juice.grid (row=4, column=1)
IblRice = Label (fl, font = ("aria", 16, "bold"), text= "Rice" , fg="blue", bd=10, anchor="w")
IblRice.grid (row=5, column=1)
TxtRice = Entry (fl, font = ("Arial", 16, "bold"), textvariable = Rice, bd=6, insertwidth=4, justify="right")
txtRice.grid (row=5, column=1)

IblMeat = Label (fl, font = ("aria", 16, "bold"), text= "Rice" , fg="blue", bd=10, anchor="w")
IblMeat.grid (row=6, column=1)
TxtMeat = Entry (fl, font = ("Arial", 16, "bold"), textvariable = Meat, bd=6, insertwidth=4, justify="right")
txtMeat.grid (row=6, column=1)

Cost = Label (fl, font = ("aria", 16, "bold"), text = "cost", fg="black", bd= 10, anchor, "w"):
Cost.grid (row=3, column=2)
Cost = Entry (fl, font = ("arial", 16, "bold") , textvariable = cost, bd=6, insertwidth = 4, bg="white",
justify="night")
Cost.grid (row=3, column2)

Tax = Label (fl, font = ("aria", 16, "bold"), text = "Tax", fg="black", bd= 10, anchor, "w"):
Tax.grid (row=4, column=2)
Cost = Entry (fl, font = ("arial", 16, "bold") , textvariable = tax, bd=6, insertwidth = 4, bg="white",
justify="night")
Tax.grid (row=4, column2)
Subtotal = Label (fl, font = ("aria", 16, "bold"), text = "Subtotal", fg="black", bd= 10, anchor, "w"):
Subtotal.grid (row=5, column=2)
Subtotal = Entry (fl, font = ("arial", 16, "bold") , textvariable = Subtotal, bd=6, insertwidth = 4,
bg="white", justify="night")
Subtotal.grid (row=5, column2)

Total = Label (fl, font = ("aria", 16, "bold"), text = "Total", fg="black", bd= 10, anchor, "w"):
Total.grid (row=6, column=2)
Total = Entry (fl, font = ("arial", 16, "bold") , textvariable = Total, bd=6, insertwidth = 4,
bg="white", justify="night")
Total.grid (row=6, column2)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy