BRIEF DESCRIPTION ABOUT THE PROJECT
[Link] Management:-
Users can easily add new sweet items to the inventory by entering details such as code,
name cost per kg, quantity, and main ingredient.
Modifications can be made to existing sweets, allowing users to change any of the
details as needed.
Users can remove sweets from the inventory by providing the unique sweet code.
Quickly find specific sweets by entering their unique code, making it easy to locate
items in the inventory.
[Link] Billing:-
The system allows users to generate bills for customers by selecting sweets and
specifying quantities.
The application calculates the total due amount based on the price per kg and the
quantity purchased.
Each bill is associated with customer details, including name and billing date, for future
reference.
[Link] Persistence:-
All data regarding sweets and customer transactions are stored in CSV files, ensuring
that the information persists across sessions.
The system can read from and write to these CSV files, allowing users to access and
update data seamlessly.
[Link] Visualization:-
Visual representation of the cost of sweets helps users understand pricing trends and
make informed decisions.
Displays a summary of total sales for different customers, providing insights into sales
trends.
Charts are generated using Matplotlib, making it visually appealing and easy to
interpret.
1|Page
[Link]-Friendly Interface:-
The system provides a simple menu-driven interface that guides users through various
functions.
Users receive immediate feedback on their actions, helping them understand the results
of their inputs.
Basic error handling is implemented to manage invalid inputs and guide users toward
correct usage.
2|Page
The Source Of Dataset
[Link] Dataset ([Link]):-
This dataset contains information about the various sweets available in the shop. The key
attributes typically include:
Code: A unique identifier for each sweet.
Name: The name of the sweet.
Cost: The price per kilogram of the sweet.
Quantity: The available quantity of the sweet in kilograms.
Main Ingredient: The main ingredient used in the sweet.
[Link] Billing Dataset ([Link]):-
This dataset keeps track of customer transactions and billing details. The key attributes
usually include:
Bill ID: A unique identifier for each bill transaction.
Name: The name of the customer.
Billing Date: The date when the transaction occurred.
Order Amount: The total amount due for the sweets purchased.
Sweet Name: The name of the sweet purchased.
Together, these datasets facilitate the management of inventory and customer transactions
within
the sweet shop, enabling efficient operations and record-keeping.
3|Page
REQUIERMENTS
[Link] REQUIREMENTS:
Operating system- Windows 10 or latest Ram- 4 GB
Processor - Intel i3/i5
Hard disk space- 90KB
[Link] REQUIEREMENTS:
Python – IDLE
Matplotlib Module
Pandas Module
Microsoft Excel
4|Page
MODULES
[Link] pandas:
Purpose: For data manipulation and analysis.
Key Functions:
Reading and writing CSV files.
Managing data structures such as DataFrames for handling sweet
inventory and customer data.
[Link] matplotlib,pyplot:
Purpose: For data visualization.
Key Functions:
Creating plots and charts to visualize sales and inventory data.
[Link] random:
Purpose: For generating random numbers.
Key Functions:
Randomly selecting items or generating unique identifiers for sweets.
[Link] OS:
Purpose:
Key Functions:
5|Page
About Pandas – Series, Dataframe and
Matplotlib,OS
Pandas:
Pandas is a popular open-source Python library that provides powerful data
manipulation and analysis tools. It's widely used in data science, machine
learning, and various other fields for working with structured data. One of
the core components of Pandas is the DataFrame, which plays a crucial role
in data handling within a project.
Series:
In pandas, a series is a one-dimensional labeled data structure that can store
various types of data, such as numbers, strings, or even complex objects.
Each element in a series is associated with a label or index, allowing for
efficient data manipulation and analysis.
DataFrame:
A DataFrame in pandas is a pivotal data structure for Python data analysis,
providing a two-dimensional, tabular format for organizing and manipulating
data. With extensive functionality for data cleaning, transformation, and
exploration, they empower data professionals and researchers to efficiently
work with structured data. DataFrames are widely utilized in data science
and analysis, integrating seamlessly with other libraries and tools to facilitate
tasks like filtering, grouping, aggregation, and merging.
Matplotlib:
Matplotlib is a popular Python library for creating high-quality data
visualizations. It provides a wide range of tools and functions for generating
various types of charts and plots. Matplotlib is extensively used in data
analysis, scientific research, and data presentation due to its flexibility and
customization options.
6|Page
OS:
7|Page
SCREENSHOTS
[Link] Menu:
[Link] view all sweets:
8|Page
[Link] add a new sweet in the list:
To verify to see if the sweet is added or not:
9|Page
[Link] search the sweet by its sweet code:
[Link] delete a sweet from the list:
10 | P a g e
To verify if the sweet is deleted or not:
[Link] update a sweet:
11 | P a g e
To verify if the sweet is updated or not:
12 | P a g e
[Link] create a bill for customer:
13 | P a g e
8. To show charts of sweets:
[Link] quit the sweet shop:
SOURCE CODE
14 | P a g e
import pandas as pd
import random
import [Link] as plt
import os
def addSweet(df):
code = int(input("Enter the sweet code: "))
name = input("Enter the name of the sweet: ")
cost = float(input("Enter cost per kg: "))
qty = float(input("Enter quantity in kgs: "))
ig = input("Enter the main ingredient: ")
[Link][code] = [name, cost, qty, ig]
print("\nAdded Successfully\n")
def createBill(df, bf):
print("Available Sweets\n")
print("*" * 50)
print(df[['Sweet Name', 'Cost', 'Quantity', 'Main Ingredient']])
print("*" * 50)
code = int(input("Enter the code of the sweet to be purchased: "))
if code in [Link]:
qty = float(input("Enter the quantity to be purchased (in kgs): "))
15 | P a g e
amt = qty * [Link][code, 'Cost']
print("Your Due Amount is: ", amt)
name = input("Enter Customer name: ")
bdate = input("Enter Billing Date: ")
bill_id = [Link](1000, 9999)
sweet_name = [Link][code, 'Sweet Name']
expected_columns = ['Name', 'Billing Date', 'Order Amt', 'Sweet Name']
for column in expected_columns:
if column not in [Link]:
bf[column] = [Link](dtype='str' if column != 'Order Amt' else
'float')
[Link][bill_id] = [name, bdate, amt, sweet_name]
file_path = (r"C:\Users\user\Desktop\Karthik\Customer final without
sweet [Link]")
if [Link](file_path):
try:
bf.to_csv(file_path, mode='a', header=False, index=False)
print("Bill Created Successfully!")
16 | P a g e
except PermissionError:
print(f"Permission denied when trying to access {file_path}. Please
check if the file is open in another application.")
except Exception as e:
print(f"An error occurred: {e}")
else:
print(f"File {file_path} does not exist.")
else:
print("No sweet found with this code")
print("*" * 50)
print("\t\t Murugan Sweet Shops")
print("*" * 50)
df = pd.read_csv(r"C:\Users\user\Desktop\Karthik\Sweet shop [Link]")
df = [Link][:, ~[Link]('^Unnamed')] # Clean up any unnamed
columns
while True
print("Press 1 - Show all Sweets")
print("Press 2 - Add a New Sweet")
print("Press 3 - Search Sweet by Code")
print("Press 4 - Delete Sweet")
17 | P a g e
print("Press 5 - Update Sweet")
print("Press 6 - Create Bill")
print("Press 7 - Show Chart of Sweets")
print("Press 8 - To Quit")
n = int(input("Enter your choice: "))
if n == 1:
print("\n", "*" * 50)
print(df)
print("*" * 50)
elif n == 2:
addSweet(df)
elif n == 3:
code = int(input("Enter the sweet code to be searched: "))
if code in [Link]:
print([Link][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 [Link]:
[Link](code, inplace=True)
18 | P a g e
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 [Link]:
name = input("Enter the updated name of the sweet: ")
cost = float(input("Enter updated cost per kg: "))
qty = float(input("Enter quantity in kgs: "))
ig = input("Enter the main ingredient: ")
[Link][code] = [name, cost, qty, ig]
print("\nUpdated\n")
else:
print("No sweet found with this code")
elif n == 6:
bf = [Link](columns=['Name', 'Billing Date', 'Order Amt', 'Sweet
Name']) # Initialize empty bill DataFrame
createBill(df, bf)
elif n == 7:
[Link](df["Sweet Name"], df["Cost"], color="blue")
[Link]("Rate List of Sweets")
[Link]("Sweet Name")
19 | P a g e
[Link]("Cost per kg")
[Link](rotation=45)
[Link]()
elif n == 8:
df.to_csv(r"C:\Users\user\Desktop\Karthik\Customer final without sweet
[Link]", index=True)
print("Thanks for Visiting")
print("Data Updated !!!")
break
CONCLUSION
20 | P a g e
The Sweet Shop Management System is a user-friendly software solution
designed to streamline the daily operations of Karthik Sweet Shop. It allows
the shop owner to efficiently manage sweet inventory, create bills for
customers, and maintain records of transactions. Key features include:
Sweet Management: Add, update, delete, and view sweets with details like
cost, quantity, and ingredients.
Billing System: Generate bills based on customer purchases, with real-time
calculations and unique bill IDs.
Data Visualization: Generate charts for better insights into pricing and sales
trends.
CSV Integration: Save data in CSV files for easy backup and retrieval.
This system improves the efficiency of shop operations, reduces manual
work, and ensures accurate record-keeping. It can be easily expanded to
include additional features like sales forecasting and multi-user support.
Overall, it enhances business management and customer service.
BIBLIOGRAPHY
21 | P a g e
[Link]:
From Sweet shops
[Link]:
IP Class 12 Textbook
[Link] Links:
[Link]
[Link]
[Link]
22 | P a g e