Avika
Avika
KANPUR
A Project Report
on
……………………………….
Submitted By:
Name:… … … … … … …
.
Roll No: … … … … … …
Under the Guidance of:
Ashok Uttam
PGT(CS)
Declaration
I hereby declare that the project REPORT entitled
“……………………………………………
……….” submitted to department of computer
science, PM SHRI KV No2 Armapur, Kanpur is
prepared by me. All the coding and project report
is original and our personal effort.
Name:
………………………….
Roll
No:… … … … … … … … …
ACKNOWLEDGEMET
CONTENTS
Requirement
● Hardware
Requirement
1. CPU- intel/AMD
2. RAM- Minimum 2
GB
3. HDD/SSD-512GB
● Software
Requirement
1. Python IDLE
import tkinter as tk
from tkinter import messagebox
class RestaurantManagementSystem:
def __init__(self, root):
self.root = root
self.root.title("Restaurant Management System")
self.customer_name = tk.StringVar()
self.customer_contact = tk.StringVar()
self.items = {
"Burger": 49,
"Pizza": 199,
"Pasta": 159,
"Sandwich": 80,
"Salad": 90
}
self.orders = {}
self.gst_percentage = 18
self.create_gui()
def create_gui(self):
details_frame = tk.LabelFrame(self.root, text="Customer Details")
details_frame.pack(fill="x", padx=10, pady=10)
contact_entry.configure(validatecommand=(contact_entry.register(self.va
lidate_contact), "%P"))
row = 1
for item, price in self.items.items():
item_var = tk.IntVar()
item_label = tk.Label(menu_frame, text=f"{item} -
{self.convert_to_inr(price)}")
item_label.grid(row=row, column=0, padx=5, pady=5, sticky="w")
row += 1
buttons_frame = tk.Frame(self.root)
buttons_frame.pack(fill="x", padx=10, pady=10)
def show_bill_popup(self):
# Check if customer name is provided
if not self.customer_name.get().strip():
messagebox.showwarning("Warning", "Please enter customer
name.")
return
selected_items = []
total_price = 0
if not selected_items:
messagebox.showwarning("Warning", "Please select at least one
item.")
return
messagebox.showinfo("Bill", bill)
def past_records(self):
messagebox.showinfo("Past Records", "This feature is not
implemented yet.")
def clear_selection(self):
for item, info in self.orders.items():
info["var"].set(0)
info["quantity"].delete(0, tk.END)
@staticmethod
def convert_to_inr(amount):
return "₹" + str(amount)
root = tk.Tk()
restaurant_system = RestaurantManagementSystem(root)
root.mainloop()
import tkinter as tk
from tkinter import ttk
if unit == "Kilograms":
kg = weight
g = weight * 1000
lbs = weight * 2.20462
oz = weight * 35.274
elif unit == "Grams":
kg = weight / 1000
g = weight
lbs = weight * 0.00220462
oz = weight * 0.035274
elif unit == "Pounds":
kg = weight / 2.20462
g = kg * 1000
lbs = weight
oz = weight * 16
elif unit == "Ounces":
kg = weight / 35.274
g = kg * 1000
lbs = weight / 16
oz = weight
except ValueError:
result_var.set("Please enter a valid number.")
# GUI Setup
root = tk.Tk()
root.title("Weight Converter")
root.geometry("350x300")
# Input Field
tk.Label(root, text="Enter Weight:").pack()
weight_entry = tk.Entry(root)
weight_entry.pack()
# Convert Button
convert_btn = tk.Button(root, text="Convert", command=convert_weight)
convert_btn.pack(pady=10)
# Result Display
result_var = tk.StringVar()
tk.Label(root, textvariable=result_var, fg="blue", font=("Arial", 12)).pack()
root.mainloop()