Posts

Showing posts from October, 2025

Bus Booking System in tkinter

Image
  Bus Booking System Tkinter   Code: import tkinter as tk from tkinter import messagebox, simpledialog   fares = {     ("Chennai", "Kovai"): 400,     ("Trichy", "Salem"): 350,     ("Salem", "Chennai"): 410,     ("Chennai", "KanyaKumari"): 500 }   class BusBookingApp:     def __init__(self, root):         self.root = root         self.root.title("Bus Ticket Booking System")           tk.Label(root, text="Available Routes:").grid(row=0, column=0, columnspan=3, pady=5)         row_index = 1         for route, price in fares.items():             tk.Label(root, text=f"{route[0]} → {route[1]} : ₹{price}").grid(row=row_index, co...

Bus Booking System

Image
 Code: # Bus Ticket Booking Mini Project with Price Calculation fares = {     ("Chennai", "Kovai"): 400,     ("Trichy", "Salem"): 350,     ("Salem", "Chennai"): 410,     ("Chennai", "KanyaKumari"): 500 } def book_ticket():     print("=== Bus Ticket Booking System ===")               print("\nAvailable Routes:")     for i, (route, price) in enumerate(fares.items(), 1):         print(f"{i}. {route[0]} → {route[1]} : ₹{price}")          source = input("\nEnter Source: ")     destination = input("Enter Destination: ")              if (source, destination) not in fares:         print(" Sorry, no bus available for this route.")         return               price_per_seat = fares[(source, destination)]      ...