Professional Documents
Culture Documents
_____________ _____________
Mrs. Chandrima Ghosh EXTERNAL
(INTERNAL)
ACKNOWLEDGEMENT
_________ _________
Mrs. Chandrima Ghosh Student
INDEX PAGE
SERIAL TOPIC PAGE
NO. NO.
O1 INTRODUCTION
O5 OUTPUT WINDOW
06 LIMITATIONS
07 BIBLIOGRAPY
INTRODUCTION
This software is helpful to citizens, being exploring in nature
and also in urgency to go for a board towards achieving their
respective objectives. For booking the transport, this
application allows user friendly environment. The objective of
this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed
the students how programming skills helps in developing a
good software. We designed the library management system
using Tkinter module of python to make it interactive. The
project is as it helps the agency to have a record of the travel.
It is helpful towards the users as it gives them the convenience
to select the required ride and also the mode of travel.
This program also gives an insight to the status of the daily
travel by showing graphical representation of monthly
evaluation.
SOFTWARE REQUIREMENTS:
I. OPERATING SYSTEM: Windows 10 and above
II. Anaconda syder (python,matplotlib and tinker module)
III. Mysql and mysql connector
CAR DETAILS
Car name Confirms the user id.
Confirms the source from were the user
Source
will be taking the car.
CSv file
Date structure
FILE NAME FIELD NAMES DATA TYPE FUNCTION
Car Details
car_no INT To save the car id
car_name VARCHAR To save the car name
Car Booking
SOURCE CODE
import tkinter as tk
from tkinter import messagebox
from tkinter import filedialog
from tkinter import ttk
import mysql.connector
from PIL import ImageTk, Image
from tkinter import *
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use("TkAgg")
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
def get_connection():
connection = mysql.connector.connect(user='root', password='root',port="3306",
host='localhost',
database='carbooking')
return connection
def close_connection(connection):
if connection:
connection.close()
#Feedback Save
def submitfeedback():
fname = nameEntryTabThree.get()
faddress = addressEntryTabThree.get()
femail = emailEntryTabThree.get()
fphno = phoneEntryTabThree.get()
ftitle = TitleEntryTabThree.get()
fmsg = MessegeEntryTabThree.get()
try:
connection = get_connection()
cursor = connection.cursor()
def submitCar():
carname = carnameEntryTabOne.get()
carsource = sourceEntryTabOne.get()
cardestination = destEntryTabOne.get()
cartypes = typeEntryTabOne.get()
try:
connection = get_connection()
cursor = connection.cursor()
def submitcarbooking():
pname = pasnameEntryTabTwo.get()
paddress = pasaddressEntryTabTwo.get()
pphone = pasphoneEntryTabTwo.get()
pemail = pasemailEntryTabTwo.get()
pcar = pcarEntryTabTwo.get()
ppickup = paspickupEntryTabTwo.get()
pdrop = pasdropEntryTabTwo.get()
ptravel = pastravelEntryTabTwo.get()
pamount = pasamountEntryTabTwo.get()
connection.commit()
id=cursor.lastrowid
messagebox.showinfo("Alert", msgstr)
#db_version = cursor.fetchone()
#print("You are connected to MySQL version: ", db_version)
close_connection(connection)
except (Exception, mysql.connector.Error) as error:
print("Error while getting data", error)
def combo_input():
connection = get_connection()
cursor = connection.cursor()
data = []
return data
def create_charts():
global x1
global x2
global x3
global bar1
global pie2
x1 = float(entry1.get())
x2 = float(entry2.get())
x3 = float(entry3.get())
def prop(n):
return 360.0 * n / 1000
form = tk.Tk()
#form.geometry("700x400")
form.title("Car Details Entry")
form.resizable(width=False, height=False)
form.geometry('{}x{}'.format(850,600))
#path = 'online-car-booking-500x500.png'
#img=Image.open(path)
#img=img.resize((650,100))
#my_img = ImageTk.PhotoImage(img)
#panel = tk.Label(form, image = my_img)
#panel.pack(side = "top", fill = "both", expand = 0)
#form.mainloop()
tab_parent = ttk.Notebook(form)
tab1 = ttk.Frame(tab_parent)
tab2 = ttk.Frame(tab_parent)
tab3 = ttk.Frame(tab_parent)
tab4 = ttk.Frame(tab_parent)
tab5 = ttk.Frame(tab_parent)
tab6 = ttk.Frame(tab_parent)
carnameEntryTabOne = tk.Entry(tab1)
sourceEntryTabOne = tk.Entry(tab1)
destEntryTabOne = tk.Entry(tab1)
typeEntryTabOne = tk.Entry(tab1)
pasnameEntryTabTwo = tk.Entry(tab2)
pasaddressEntryTabTwo = tk.Entry(tab2)
pasphoneEntryTabTwo = tk.Entry(tab2)
pasemailEntryTabTwo = tk.Entry(tab2)
n = tk.StringVar()
pcarEntryTabTwo = ttk.Combobox(tab2, textvariable = n)
pcarEntryTabTwo['values'] = combo_input()
pcarEntryTabTwo.current(0)
paspickupEntryTabTwo = tk.Entry(tab2)
pasdropEntryTabTwo = tk.Entry(tab2)
pastravelEntryTabTwo = tk.Entry(tab2)
pasamountEntryTabTwo = tk.Entry(tab2)
buttonCommit = tk.Button(tab2, text="Add Record to
Database",command=submitcarbooking)
nameEntryTabThree = tk.Entry(tab3)
addressEntryTabThree= tk.Entry(tab3)
emailEntryTabThree= tk.Entry(tab3)
phoneEntryTabThree = tk.Entry(tab3)
TitleEntryTabThree= tk.Entry(tab3)
MessegeEntryTabThree= tk.Entry(tab3)
#imgLabelTabThree= tk.Label(tab3)
connection = get_connection()
cursor = connection.cursor()
cursor.execute('SELECT * FROM carbooking.car_booking ;')
# take the data
lst = []
m=0
total_rows = len(lst)
total_columns = len(lst[0])
close_connection(connection)
connection = get_connection()
cursor = connection.cursor()
cursor.execute('SELECT * FROM carbooking.feedback ;')
# take the data
lst = []
m=0
total_rows = len(lst)
total_columns = len(lst[0])
close_connection(connection)
new_york = float("100")
paris = float("80")
london = float("60")
titan = float("40")
brooklyn = float("20")
pieSizes = []
labels=[]
explode=[]
k=0
connection = get_connection()
cursor = connection.cursor()
cursor.execute('SELECT DATE_FORMAT(t.entry_date, "%d/%m/%Y"),t.tot FROM (select
entry_date,SUM(amount) as tot from car_booking group by entry_date order BY entry_date
asc limit 5) t ;')
pieSizes.append(rows[1])
labels.append(rows[0])
explode.append(0.02)
k=k+1
plot.axis('equal')
canvas = FigureCanvasTkAgg(figure, tab6)
tab_parent.pack(expand=1, fill='both')
form.mainloop()
OUTPUT
PAGE SHOWING THE ENTRY OF ALL THE BOOKINGS
No one is perfect! Some are too tall, some too short, some
enjoy country music (nothing personal), some do not drink
coffee. The hardest part of building a software is deciding,
precisely what to build and how to build.
BIBLIOGRAPHY
1.BOOKS:
Computer science With Python - Class XI and XII By: Sumita Arora
2. WEBSITE:
https://pythonexamples.org/
https://www.geeksforgeeks.org/
https://pandas.pydata.org/
https://stackoverflow.com/
https://www.educative.io/edpresso