0% found this document useful (0 votes)
15 views41 pages

Gautam

The document is a project file created by Gautam Kumar for a Sweet Shop project as part of the Informatics Practices curriculum for the academic year 2024-2025. It includes sections on project introduction, hardware and software requirements, Python code, and data visualization techniques, highlighting the use of Python for managing sweet shop operations. The project aims to streamline customer order management and includes various functionalities such as adding, displaying, editing, and deleting sweet records.

Uploaded by

ls2523200
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)
15 views41 pages

Gautam

The document is a project file created by Gautam Kumar for a Sweet Shop project as part of the Informatics Practices curriculum for the academic year 2024-2025. It includes sections on project introduction, hardware and software requirements, Python code, and data visualization techniques, highlighting the use of Python for managing sweet shop operations. The project aims to streamline customer order management and includes various functionalities such as adding, displaying, editing, and deleting sweet records.

Uploaded by

ls2523200
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/ 41

INFORMATICS

PRACTICES
PROJECT FILE

MADE BY :
Gautam Kumar
Class : 12 ‘B’
BRL DAV PUBLIC SCHOOL
BHANDARIDAH (BOKARO)

PROJECT ON
Sweet Shop

SESSION : 2024 - 2025

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

I would like to express my special


thanks and gratitude to our principal
sir Mr. Rajesh Kr. Singh as well as my
subject teacher Mr. Shubham Pathak
who gave me the golden opportunity to
do this wonderful project because of
which I came to know about many new
things.

Secondly, I would also like to thanks


my parents and friends who have
helped me a lot in finishing the project
in limited time.
DECLARATION
I hereby declare that
this project work entitled
“Sweet Shop”
submitted by me during the session 2024-25
under the guidance of
Mr. Shubham Kumar,
Department of Informatic practices,
of BRL DAV Public School Bhandaridah,
this project work has not performed
the basis for the award of any
Degree or diploma / associate ship /
Fellowship
and similar project if any.

Gautam Kumar
Class XII ‘B’
INDEX

1. INTRODUCTION 1 - 13

2. HARDWARE AND SOFTWARE 14 - 15

3. PYTHON CODE 16 - 20

4. CSV FILE 21 - 23
1 - 13

5. INPUT AND OUTPUT 24 - 34

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

Python is an easy to learn, powerful


programming language. It has efficient high-
level data structures and a simple but effective
approach to object- oriented programming.
Python's elegant syntax and dynamic typing,
together with its interpreted nature, make it an
ideal language for scripting and rapid
application development in many areas on
most platforms. The Python interpreter and
the extensive standard library are freely
available in source or binary form for all
major platforms from the Python web site,
and may be freely distributed. The same site
also contains distributions of and pointers to
many free third party Python modules,
programs and tools, and additional
documentation . The Python interpreter is
easily extended with new functions and data
types implemented in C or C++ (or other
languages callable from C). Python is also
suitable as an extension language for
customizable application.

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.

5. GUI PROGRAMMING SUPPORT


Graphical User interfaces can be made using a module
such as PyQt5, PyQt4, wx Python, or Tk in Python.
PyQt5 is the most popular option for creating
graphical apps with Python.

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.

7. LARGE COMMUNITY SUPPORT


Python has gained popularity over the years. Our
questions are constantly answered by the enormous
Stack Overflow community. These websites have
already provided answers to many questions about
Python, so Python users can consult them as needed.
5
Features of python

• Interpreted - An interpreter processes the


source file at runtime, it reads the lines of code
one by one and performs what is said.
Similarly to Perl and PHP, Python does not
require that you compile your program
before executing it. So, you do not have to
invoke a compiler. Instead of running the
compiler that helps turn source files into
compiled class files, you simply run a py file.
Python byte code compilation is automatic
and entirely implicit.

• High-level – Python relies on easy-to-read


structures that are later translated into a low-
level language, the original code that is run
on a computer’s central processing unit (CPU).
A high- level language is intended to be used
by a programmer and the written code is
further interpreted into a low-level language.
Like C++ or Java, before running, Python has
to be processed. This enables Python’s
portability – it can run on different kinds of
computers with nearly no modifications .
General-purpose Python can be used for
nearly everything.
6
Introduction of csv
Despite this drawback, CSV remains widespread in data
applications and is widely supported by a variety of software,
including common spreadsheet applications such as Microsoft
excel. Benefits cited in favor of CSV include human
readability and the simplicity of the format. Comma-
separated values (CSV) is a text file format that uses commas
to separate values. A CSV file stores tabular data (numbers
and text) in plain text, where each line of the file typically
represents one data record. Each record consists of the same
number of fields, and these are separated by commas in the
CSV file. If the field delimiter itself may appear within a field,
fields can be surrounded with quotation marks delimite The
CSV file format is one type of r-separated file format.
Delimiters frequently used include the comma, tab, space,
and semicolon. Delimiter-separated files are often given a
".csv" extension even when the field separator is not a comma.
Many applications or libraries that consume or produce CSV
files have options to specify an alternative delimiter . The lack
of adherence to the CSV standard RFC 4180 necessitates the
support for a variety of CSV formats in data input
software.Delimiters frequently used include the comma, tab,
space, and semicolon. Delimiter-separated files are often
given a “.csv” extension even when the field separator is not a
comma. Many applications or libraries that consume or
produce CSV files have options to specify an alternative
delimiter.The lack of adherence to the CSV standard RFC 4180
necessitates the support for a variety of CSV formats in data
input software.
7
FEATURES OF CSV

Features of csv Easy to organize and edit –


CSV files are editable and the changes are
not locked, unless of course a user locks a
certain set of cells from editing. The good
news is that unlike PDF downloads of
spreadsheet data, CSVs can be changed
later. Utilized by many different business
software programs – Many types of
enterprise software programs rely on CSV
imports for on boarding user data. At the
same time, plenty of programs have CSVs as
their main output for reports. Used by major
spreadsheet applications – When you use
CSV files, you can edit and create them in
Microsoft Excel or Google Sheets.

8
Data Visualisation

“ A picture is worth a thousand words”. Most of


us are familiar with this expression. Data
visualization plays an essential role in the
representation of both small and large-scale
data. It especially applies when trying to
explain the analysis of increasingly large
datasets. Data visualization is the discipline of
trying to expose the data to understand it by
placing it in a visual context. Its main goal is to
distill large datasets into visual graphics to
allow for easy understanding of complex
relationships within the data. Several data
visualization libraries are available in Python,
namely Matplotlib, Seaborn, and Folium etc,
correspondence.”

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

Matplotlib has a variety of graphical feature and is


very easy to understand. This article focuses on
different graphical features including syntax.
Matplotlib is one of the best visualisation libraries in
python for 2 Dimensional datasets. This library is
built on NumPy arrays. John Hunter invented this
library in the year 2002. It made the plotting simpler
and more effective, also made it very easy to generate
visualisations. This library supports both static as
well as dynamic plotting, and can save images in
multiple formats like jpg, png , pdf etc. , Matplotlib
has different types of plots like scatter plot, histogram,
bar plot, line plot, pie chart, and many more. The
beauty of this library is each part of the plot is
customisable including axes, size, titles, colours,
legends, markers, size, line etc.The interface of this
library is very similar to that of MATLAB and
includes most of the features that are similar to
MATLAB. This could be one of the reasons for the
name matplotlib as this is been considered as an
open-source replacement for MATLAB involves
licenses and added cost.

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 :-

• Operating system : Windows 95 or 98, XP


• Backend : ORACLE 8.0
• Frontend : VISUAL BASIC 6.0
• Programming : Python 36.4
Language
• Browser : Chrome Version
56.0.2924.87

Hardware Reqiures :-

Processor : intel i3 or above processor


Ram. : 2GB or above
Hard disk capacity : Minimum requirement is
80 GB
Display type : Standard VGA or SVGA
card
Total Disk Spac : 256 GB

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

You might also like