Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views10 pages

Python Miniproject 3.0

The document outlines a mini-project titled 'Shopping List,' developed by students in Computer Engineering at Datta Meghe College of Engineering, which presents a digital shopping list management system using Python and Tkinter. It details the project's objectives, features, architecture, and provides a source code example, emphasizing the benefits of digital solutions over traditional paper lists. Future enhancements are suggested to improve functionality, including user authentication and integration with voice assistants.

Uploaded by

vaishupc17
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)
10 views10 pages

Python Miniproject 3.0

The document outlines a mini-project titled 'Shopping List,' developed by students in Computer Engineering at Datta Meghe College of Engineering, which presents a digital shopping list management system using Python and Tkinter. It details the project's objectives, features, architecture, and provides a source code example, emphasizing the benefits of digital solutions over traditional paper lists. Future enhancements are suggested to improve functionality, including user authentication and integration with voice assistants.

Uploaded by

vaishupc17
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/ 10

SHOPPING LIST

Submitted in partial fulfillment of the requirements of


Second Year
in
Computer Engineering

By

Ali Mehnaz - A – 01
Payal Bombe - A -10
Gaurang Gadhari -A - 19

Supervisor
Prof. Rina Bora

Department of Computer Engineering

DATTA MEGHE COLLEGE OF ENGINEERING, AIROLI,


NAVI MUMBAI - 400 708

University of Mumbai
(AY 2023-24)
CERTIFICATE

This is to certify that the Mini Project in SBLC entitled “College Automation

and Scheduling system” is a bonafide work of GAURANG GADHARI(01) ,

PAYAL BOMBE(10) , ALI MEHNAZ (01) submitted to the University of

Mumbai in partial fulfillment of the requirement for the award of the degree of

“Bachelor of Engineering” in “Computer Engineering” .

(Prof. )
Supervisor
Contents

Abstract

1 Introduction 1

2 Problem Statement 11

3 Proposed System 18

3.1 Introduction
3.2 Architecture/ Framework and Algorithm/process design
3.3 Details of Hardware & Software
4 Results
5 Conclusion and Future work.

References 32
Abstract:
The "Shopping List" mini-project is a Python application built using the
Tkinter library to provide users with a digital shopping list management system. The
interface allows users to add and remove items, display the current list, and calculate the
total number of items. The project demonstrates essential concepts of GUI programming
and data management, offering a practical example of creating a simple shopping list
application

1. INTRODUCTION:
Managing shopping lists is a common task in daily life, whether for groceries, household
items, or other necessities. While traditional paper-based lists are still prevalent, digital
solutions offer convenience and flexibility. The "Shopping List" mini-project presents a
simple yet effective digital solution developed using Python and Tkinter, a standard GUI
toolkit.
In this project, we aim to create a user-friendly interface that allows users to manage their
shopping lists efficiently. By leveraging the capabilities of Tkinter, we provide
functionalities such as adding and removing items, displaying the current list, and
calculating the total number of items. Through this project, users can experience the
benefits of digital list management, including ease of use, organization, and the ability to
quickly update and track items.
The project not only serves as a practical tool for managing shopping lists but also serves
as an educational resource for learning GUI programming concepts in Python. By
examining the code and understanding its functionalities, users can gain insights into
event-driven programming, interface design, and data management techniques.

2. PROBLEM STATEMENT:

Traditional paper-based shopping lists are prone to being lost or misplaced, leading to
inconvenience and potential oversights during grocery shopping. Therefore, there is a need for a
digital solution that provides a user-friendly interface for managing shopping lists efficient

3.PROPOSED SYSTEM

3.1 INTRODUCTION:

The proposed system builds upon the limitations of traditional paper-based shopping lists
by introducing a digital solution designed to streamline the shopping list management
process. Developed using Python and Tkinter, the system offers an intuitive graphical user
interface (GUI) that empowers users to efficiently create, update, and track their shopping
lists.

Key features of the proposed system include the ability to add and remove items
dynamically, display the current shopping list in a structured format, and calculate the
total number of items for quick reference. By transitioning to a digital platform, users can
benefit from enhanced organization, reduced likelihood of list misplacement, and the
convenience of real-time updates.

Through the implementation of this system, users can expect an improved shopping
experience characterized by ease of use, accuracy, and time savings. Additionally, the
system serves as an educational resource for individuals interested in learning GUI
programming concepts in Python, providing practical insights into interface design and
data management techniques. Overall, the proposed system represents a modern and
efficient solution for managing shopping lists in today's digital age.

3.2 ARCHITECTURE FRAMEWORK AND ALGORITHM PROCESS


DESIGN:

The "Shopping List" mini-project utilizes Tkinter for the graphical user interface (GUI)
development and Python for the backend logic. Tkinter offers a straightforward framework for
building desktop applications with GUI elements such as labels, entry fields, buttons, and
listboxes. The application's architecture consists of the UI component developed in Tkinter and
the backend logic implemented in Python, with a simple data structure (dictionary) to store
shopping list items and quantities.

Algorithm/Process Design:

1. Initialization:
 Initialize an empty dictionary for the shopping list.
 Create the Tkinter window and layout the UI components.
2. Adding an Item:
 Get the item name and quantity from the user.
 Add the item and its quantity to the shopping list dictionary.
 Display a success message.
3. Removing an Item:
 Get the item name from the user.
 Remove the item from the shopping list if it exists.
 Display a success or error message.
4. Displaying the List:
 Iterate through the shopping list dictionary and display items in the listbox
widget.
5. Calculating Total Items:
 Sum up the quantities of all items in the shopping list dictionary.
 Display the total number of items.
6. Event Handling:
 Bind events to UI components (e.g., buttons) to trigger corresponding actions.
 Define event handlers to execute functions based on user interactions.
7. Main Loop:
 Start the Tkinter main event loop to handle user inputs and update the GUI.

This design ensures a straightforward and efficient shopping list management system, with
clear separation between the UI and backend logic.
3.3 DETAIL OF HARDWARE AND SOFTWARE:
Software Requirements:

1. Operating System: The project should run on Windows, macOS, or Linux, with Python
and Tkinter support.
2. Python: Python 3.x is required, with Tkinter included in the standard library.
3. IDE: Any Python-compatible IDE or text editor is suitable for development.
4. Dependencies: No additional dependencies beyond Python and Tkinter are needed.

Hardware Requirements:

1. Computer: Any standard computer capable of running Python and Tkinter is sufficient.
2. Display: A monitor or screen for displaying the graphical user interface.
3. Input Devices: A keyboard and mouse for user interaction.
4. Internet Connection: Optional, for installing dependencies or updates.

SOURCE CODE:

import tkinter as tk
from tkinter import messagebox

# Global variables
shopping_list = {} # Initialize an empty shopping list
entry_item = None
entry_amount = None
listbox = None

# Function to display the shopping list


def display_list():
listbox.delete(0, tk.END)
for item, amount in shopping_list.items():
listbox.insert(tk.END, "- " + item + " (Amount: " +
str(amount) + ")")

# Function to add an item to the shopping list


def add_item():
global entry_item, entry_amount
item = entry_item.get()
amount = entry_amount.get()
if item and amount:
amount = int(amount)
if item in shopping_list:
shopping_list[item] += amount
else:
shopping_list[item] = amount
entry_item.delete(0, tk.END)
entry_amount.delete(0, tk.END)
display_list()
messagebox.showinfo("Success", str(amount) + " " + item + "(s)
have been added to your shopping list.")
else:
messagebox.showerror("Error", "Please enter both item and
amount.")

# Function to remove an item from the shopping list


def remove_item():
global entry_item
item = entry_item.get()
if item in shopping_list:
del shopping_list[item]
entry_item.delete(0, tk.END)
display_list()
messagebox.showinfo("Success", item + " has been removed from
your shopping list.")
else:
messagebox.showerror("Error", item + " is not in your shopping
list.")

# Function to calculate the total amount of all items


def calculate_total():
total = sum(shopping_list.values())
messagebox.showinfo("Total Items", "Total number of items in
the shopping list: " + str(total))

# Main function
def main():
global entry_item, entry_amount, listbox
root = tk.Tk()
root.title("Shopping List")

frame_logo = tk.Frame(root)
frame_logo.pack(padx=10, pady=10)

label_logo = tk.Label(frame_logo, text="SHOPPING LIST",


font=("Helvetica", 24, "bold"))
label_logo.pack()

frame = tk.Frame(root)
frame.pack(padx=10, pady=10)

label_item = tk.Label(frame, text="Item:")


label_item.grid(row=0, column=0, padx=5, pady=5, sticky="e")

entry_item = tk.Entry(frame)
entry_item.grid(row=0, column=1, padx=5, pady=5)

label_amount = tk.Label(frame, text="Amount:")


label_amount.grid(row=1, column=0, padx=5, pady=5, sticky="e")

entry_amount = tk.Entry(frame)
entry_amount.grid(row=1, column=1, padx=5, pady=5)

button_add = tk.Button(frame, text="Add Item",


command=add_item)
button_add.grid(row=2, column=0, columnspan=2, padx=5,
pady=5, sticky="we")

button_remove = tk.Button(frame, text="Remove Item",


command=remove_item)
button_remove.grid(row=3, column=0, columnspan=2, padx=5,
pady=5, sticky="we")

button_display = tk.Button(frame, text="Display List",


command=display_list)
button_display.grid(row=4, column=0, columnspan=2, padx=5,
pady=5, sticky="we")

button_calculate = tk.Button(frame, text="Calculate Total",


command=calculate_total)
button_calculate.grid(row=5, column=0, columnspan=2, padx=5,
pady=5, sticky="we")

listbox = tk.Listbox(frame)
listbox.grid(row=6, column=0, columnspan=2, padx=5, pady=5,
sticky="nsew")

root.mainloop()

# Run the main function


if __name__ == "__main__":
main()

OUTPUT:

1. Display shopping list:


2. Add Items

3. Remove Item

4. Calculate Total
CONCLUTION AND FUTURE WORK:

The "Shopping List" project simplifies shopping list management with


its user-friendly interface built using Python and Tkinter. Future
improvements may include adding features like categorization, user
authentication, and data persistence. Integration with voice assistants,
enhanced user experience, and collaborative list features could further
elevate the application's functionality and user satisfaction.

REFERENCE:

https://en.wikipedia.org/wiki/Class-diagram
https://scholar.google.com/

Marks and Signature

R1 R2 R3 R4 Total Signature
(3 Marks) (3 Marks) (3 Marks) (1 Mark) (10 Marks)

You might also like