Gautam
Gautam
PRACTICES
PROJECT FILE
MADE BY :
Gautam Kumar
Class : 12 ‘B’
BRL DAV PUBLIC SCHOOL
BHANDARIDAH (BOKARO)
PROJECT ON
Sweet Shop
SUBMITTED BY :
Name :- Gautam Kumar
Class :- XII ‘B’
Board Roll No. :- 22682386
SUBMITTED TO :
Mr. Shubham Kumar
CERTIFICATE
This is to certify that
Gautam Kumar Murmu
a student of Class XII ‘B’ Board
Roll No.
22682386
has successfully completed the project under
the guidance of Mr. Shubham Kumar
(subject teacher) during the year 2024-2025
in partial fulfillment of informatics practices
examination conducted by AISSCE, NEW
DELHI.
_______________ _______________
Sign of Subject Sign of External
Teacher Invigilator
_______________
Sign of Principal
ACKNOWLEDGEMENT
Gautam Kumar
Class XII ‘B’
INDEX
1. INTRODUCTION 1 - 13
3. PYTHON CODE 16 - 20
4. CSV FILE 21 - 23
1 - 13
6. BIBLIOGRAPHY 35
INTRODUCTION
This project is prepared to simplify and make
efficient the managerial and organizational
process of business ventures/startups. In recent
years the demand for sweets has been on the
rise . There is a wide variety of sweets for
different festivals and occasions , and keeping
a track of all customer orders, making any
changes, order delegations, etc. can be
difficult and stressful , so, to reduce the burden
f workload for managing various customers
orders, we have developed this python
program on a sweet shop. This program
includes mainly five functions:
Add: This function helps to add the details
of the sweets which includes their id, name,
category , weight and price.
Display :This helps you to display the overall
details for the sweets.
Edit: this enables us to edit any typing errors.
In this, we could edit the sweet name, Sweet
Id, price etc.
Delete: this function helps to delete a record.
2
PYTHON
3
Advantages of python
1.Free and Open Source
Python language is freely available at the official
website and you can download it from the given
download link below click on the Download Python
keyword. Since it is open-source, this means that source
code is also available to the public. So you can
download it, use it as well as share it.
2. EASY TO CODE
Python basics in Python is a high-level programming
language. Python is very easy to learn the language
as compared to other languages like C, C#, Java script
, Java, etc. It is very easy to code in the Python
language and anybody can learn a few hours or
days. It is also a developer-friendly language.
3. EASY TO READ
As you will see, learning Python is quite simple. As
was already established, Python's syntax is really
straightforward. The code block is defined by the
indentations rather than by semicolons or brackets.
4
4. OBJECT-ORIENTED LANGUAGE
One of the key features of Python is Object- Oriented
programming. Python supports object- oriented
language and concepts of classes, object encapsulation,
etc.
6. HIGH-LEVEL LANGUAGE
Python is a high-level language. When we write
programs in Python, we do not need to remember the
system architecture, nor do we need to manage the
memory.
8
Data Visualisation
9
Advantages of data
visualisation
Better agreement –In business numerous a
period it happens that we need to look at the
exhibitions of two components or two situations.
A conventional methodology is to experience the
massive information of both the circumstances
and afterward examine it. This clearly will kill
a great deal of time.A superior method –It can
tackle the difficulty of placing the information
of both perspectives into the pictorial structure.
This will unquestionably give a superior
comprehension of the circumstances. For
instance, Google patterns assist us with
understanding information identified with top
ventures or inquiries in pictorial or graphical
structures.Simple sharing of data –With the
representation of the information,
organizations present another arrangement of
the correspondence.
10
Rather than sharing the cumbersome
information, sharing the visual data will draw
in and pass on across the data which is more
absorbable.b of information –The solid purpose
of information perception is that the
information based on which the data is
introduced in a visual configuration can be
changed or altered along these lines giving a
possibility for the business personals to build up
a better correspondence with the crowd.Deals
investigation –With the assistance of
information representation, a salesman can
without much of a stretch comprehend the
business chart of items. With information
perception instruments like warmth maps, he
will have the option to comprehend the causes
that are pushing the business numbers up just
as the reasons that are debasing the business
numbers. Information representation helps in
understanding the patterns and furthermore
different variables like sorts of clients keen on
purchasing, rehash clients, the impact of
topography, and so forth.
11
MatplotliB Library
12
Benefits of Matplotlib
WIDE RANGE OF PLOTS
We can create a line plot, a scatter plot, a bar plot, a
histogram, a 3D plot, and a polar plot through the matplotlib
library. In the code below, we use plt.tight layout() to adjust
the layout of subplots to avoid overlapping. These plots help
us visualize data in two-dimension and three-dimension as
well.
INTERACTIVE PLOTS
Matplotlib’s animation module allows users to create
interactive and dynamic visualizations, perfect for
showcasing time-based data or data with changing
characteristics. The resulting interactive plot showcases the
sine wave shifting horizontally, and the title dynamically
changes to indicate the current iteration.
INTEGRATION WITH
NUMPY AND PANDAS
We can integrate NumPy and Pandas, allowing users to
create plots directly from NumPy arrays or Pandas
DataFrame. If users are working with different libraries,
they will prefer using Matplotlib for feasibility. In the
code below, we create the data through NumPy and
introduce Pandas DataFrame. From this, we plotted the
graph.
13
HARDWARE AND
SOFTWARE
Software Reqiures :-
Hardware Reqiures :-
15
PYTHON CODE
Import pandas as pd
import matplotlib.pyplot as plt
import random
def addSweet(df):
code = int(input(“Enter the sweet code :”))
name = input(“Enter the name of the sweet :”)
cost = int(input(“Enter cost per kg :”))
qty = float(input(“Enter quantity in kgs :”))
ig = input(“Enter the main ingredient :”)
df.loc[code] = [name, cost, qty, ig]
print(“\nAdded Successfully \n”)
print(“*”*50)
print(“\t\t Kanha Sweet Shop”)
print(“*”*50)
df = pd.read_csv(“sweets.csv”)
While True:
print(“Press 1 – Add a New Sweet”)
print(“Press 2 – Show all”)
print(“Press 3 – Search”)
print(“Press 4 – Delete”)
print(“Press 3 – Search”)
print(“Press 4 – Delete”)
print(“Press 5 – Update”)
print(“Press 6 – Create Bill”)
print(“Press 7 – Show Chart of Sweets”)
print(“Press 8 – Show Chart of Bills”)
print(“Press 9 – To Quit”)
17
n = int(input(“Enter your choice :”))
if n == 1:
addSweet(df)
elif n == 2:
print("\n","*"*50)
print(df)
print("*"*50)
elif n == 3:
code = int(input("Enter the sweet code to be searched : "))
if code in df.index:
print(df.loc[code])
print("\n")
else:
print("No sweet found with this code ")
elif n == 4:
code = int(input("Enter the sweet code to be deleted : "))
if code in df.index:
df.drop(code,inplace=True)
print("\nDeleted\n")
else:
print("No sweet found with this code ")
elif n == 5:
code = int(input("Enter the sweet code to be updated : "))
if code in df.index:
name = input("Enter the updated name of the sweet : ")
cost = int(input("Enter updated cost per kg : "))
qty = float(input("Enter quantity in kgs : "))
ig = input("Enter the main ingredient :")
df.loc[code] = [name, cost,qty,ig]
print("\nUpdated\n")
18
else:
print("No sweet found with this code ")
elif n == 6:
print("Available Sweets ")
print("\n", "*" * 50)
print(df)
print("*" * 50)
code = int(input("Enter the code of the sweet to be
purchased : "))
if code in df.index:
qty = int(input("Enter the quantity to be purchased : "))
amt = df.loc[code,"Cost"] / df.loc[code,"Quantity"]
amt1 = amt * qty
print("Your Due Amount is ",amt1)
name = input("Enter Customer name : ")
bdate = input("Enter Billing Date : ")
bf = pd.read_csv("customer.csv",index_col="billid")
bf.loc[random.randint(1000,9999)] =
[name,bdate,amt,df.loc[code,"Name"]]
bf.to_csv("customer.csv")
else:
print("No sweet found with this code ")
elif n == 7:
plt.bar(df["Name"],df["Cost"],color="navy")
plt.title("Rate List of Sweets")
plt.show()
elif n == 8:
bf = pd.read_csv("customer.csv")
plt.title("Sold Sweets")
plt.bar(bf["name"],bf["order_amt"],color="orange")
plt.show()
19
elif n == 9:
df.to_csv("sweets.csv",index=False)
print("Thanks for Visiting")
print("Data Updated !!!")
break
20
Csv file
sweets.csv
22
customer.csv
23
INPUT AND OUTPUT
InterFace
25
Add a New Sweet
Add a New Sweet
26
Show All
Show All
27
Search
Search
28
Delete
Delete
29
Update
Update
30
Create Bill
Create Bill
31
Show chart of Sweets
Show chart of Sweets
32
Show Chart of Bills
33
EXIT
34
BIBLIOGRAPHY
1.Wikipedia
2.Google.com
3.Informatics practices Class 12 Text Book