Kendriya Vidyalaya Ambernath
ACADEMIC YEAR : 2022-23
PROJECT REPORT ON
DAILY TRAVEL BOOKING
ROLL NO : 12112
NAME : Dipankar Sonawane
CLASS : XII
SUBJECT : COMPUTER SCIENCE
1
kendriya Vidyalaya Ambernath
CERTIFICATE
This is to certificate Dipankar Pankaj sonawane of Class XI- A having CBSE
ROLL NO.12 has satisfactorily completed the “COMPUTER SCIENCE
INVESTIGATORY PROJECT” for ALL INDIA SENIOR SECONDARY
CERTIFICATE EXAMINATION 2022-2023.
2
TABLE OF CONTENTS [ T O C ]
SER DESCRIPTION
01 ACKNOWLEDGEMENT
02 INTRODUCTION
03 OBJECTIVES OF THE PROJECT
04 FLOW CHART
05 SOURCE CODE
06 OUTPUT
07 HARDWARE AND SOFTWARE REQUIREMENTS
08 BIBLIOGRAPHY
3
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of
this project.
I express deep sense of gratitude to almighty God for giving me strength for the
successful completion of the project.
I express my heartfelt gratitude to my parents for constant encouragement while
carrying out this project.
I gratefully acknowledge the contribution of the individuals who contributed in
bringing this project up to this level, who continues to look after me despite my flaws,
I would like to express my special thanks of gratitude to our Principal , Mr.
Deepak Singh Bhati and My Computer Teacher Mrs. Kshama Raut who gave
me the golden opportunity to do this wonderful project on the topic "DAILY
TRAVEL BOOKING", which also helped me in doing a lot of Research and I
came to know about so many new things I am really thankful to them.
4
PROJECT ON DAILY TRAVEL BOOKING
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.
OBJECTIVES OF THE PROJECT
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.
1. Write programs utilizing modern software tools.
2. Apply object oriented programming principles effectively when developing small
to medium sized projects.
3. Write effective procedural code to solve small to medium sized problems.
4. Students will demonstrate a breadth of knowledge in computer science, as
exemplified in the areas of systems, theory and software development.
5. Students will demonstrate ability to conduct a research or applied Computer
Science project, requiring writing and presentation skills which exemplify
scholarly style in computer science.
5
FLOW CHART
START
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='manager',database
='travel_booking')
c1=conn.cursor()
conn.autocommit==True
from time import gmtime, strftime
n=strftime("%a, %d %b %Y", gmtime())
n=str(n)
today=n[5:]
6
print(' ','________TRAVEL DAILY welcomes U!!!!!!__________')
print()
print(' ',n)
print()
print('Press 1 to Login')
choice=int (input('Enter your choice='))
if choice
==1:
7
a=int(input('Enter your phone number='))
#Name of the person
u=("select name from accounts where phone_number = "+str(a)+";")
c1.execute(u)
#Wrong phone number[account doesn't exist]
datan=c1.fetchall()
s=c1.rowcount
s=abs(s)
if s!==1:
print()
print("***********************ACCOUNT DOESN'T
EXIST************************")
8
print()
create=int(input("Press 32 to create account {{or}} Press 0 to exit="))
phone_number=int(input('Phone Number='))
name=str(input('Name='))
password =str(input( 'password[10]='))
c1.execute("insert into
accounts(Phone_number,password,name )values(" +
str(phone_number) +",'" +password + "',' "+name+" ')")
9
phone_number=int(input('Phone Number='))
name=str(input('Name='))
password =str(input( 'password[10]='))
c1.execute("insert into accounts(Phone_number,password,name )values(" + str(phone_number) +",'"
+password + "',' "+name+" ')")
conn.commit()
10
print('Account sucessfully Created')
import sys
if
choice==3:
import sys
sys.exit()
11
else:
print()
print()
print("*************
STOP
12
SOURCE CODE
DATABASE CREATION:
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='manage
r',database='travel_bookings')
c1=conn.cursor()
if conn.is_connected:
c1.execute("create database travel_booking")
print("database created successfully")
TABLE 1 CREATION:
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='manage
r',database='travel_bookings')
c1=conn.cursor()
c1.execute('create table accounts(Phone_number bigint(13)
primary key,name varchar(30),password bigint(10));')
conn.commit()
TABLE 2 CREATION:
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='manage
r',database='travel_bookings')
c1=conn.cursor()
c1.execute('create table customer_bookings(Phone_number
bigint(13) ,FOREIGN KEY(Phone_number) REFERENCES
13
accounts(Phone_number),Your_location
varchar(30),Your_destination varchar(30),time
varchar(30),Driver varchar(60),Urgency
varchar(30),date_booked varchar(90));')
conn.commit()
MAIN SOURCE CODE:
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='manage
r',database='travel_booking')
c1=conn.cursor()
conn.autocommit==True
from time import gmtime, strftime
n=strftime("%a, %d %b %Y", gmtime())
n=str(n)
today=n[5:]
print(' ','________TRAVEL DAILY welcomes
U!!!!!!__________')
print()
print(' ',n)
print()
print('Press 1 to Login')
print('Press 2 Create account')
print("press 3 delete account")
print('Press 4 to Exit')
print()
choice=int (input('Enter your choice='))
14
if choice ==1:
print()
a=int(input('Enter your phone number='))
#Name of the person
u=("select name from accounts where
phone_number = "+str(a)+";")
c1.execute(u)
#Wrong phone number[account doesn't exist]
datan=c1.fetchall()
s=c1.rowcount
s=abs(s)
if s!= 1:
print()
print("***********************ACCOUNT
DOESN'T EXIST************************")
print()
create=int(input("Press 32 to create
account {{or}} Press 0 to exit="))
if create==32:
phone_number=int(input('Phone
Number='))
name=str(input('Name='))
password =str(input( 'password[10]='))
c1.execute("insert into
accounts(Phone_number,password,name )values(" +
str(phone_number) +",'" +password + "',' "+name+" ')")
conn.commit()
print('Account sucessfully Created')
import sys
15
sys.exit()
else:
import sys
sys.exit()
datan=datan[0]
datan=list(datan)
datan= datan[0]
datan= str(datan)
#selecting password
y="select password from accounts where
phone_number =({})".format(a)
c1.execute(y)
data=c1.fetchall()
data=data[0]
data=list(data)
data=data[0]
b=int(input('Enter your password='))
if b!=data:
print()
print("***********************INVALID
PASSWORD**************************")
conn.commit()
16
if b==data:
print()
print("LOGGED IN !!!!!")
print()
print("HI",datan,"!!")
print()
print("What can I do for you?")
print()
print('12.Book for a board')
print('13.Bill verification')
print('14.My travel log')
print('0.Exit')
print()
choice1=int(input('Enter Your Choice='))
if choice1==0:
print()
print("Thank you , Visit again !!")
import sys
sys.exit()
if choice1==12:
your_location=input('Your_location=')
your_destination=input('Your_destination=')
time=input('time to start board=')
17
driver=input("driver gender
preferences=")
urgency=input('urgency(yes/no)=')
c1.execute("insert into
customer_bookings values(" + str(a) +",' " + your_location +
" ' ,' "+your_destination+ " ' ,' "+time+ " ' ,' "+driver+" '
,' "+urgency+" ',' "+today+" ' )")
conn.commit()
print()
print('********************************AT YOUR SERVICE
AT',time,"********************************")
import sys
sys.exit()
if choice1==13:
Dist=int(input('distance travelled
[km]='))
bill=Dist*5
print('your payment =Rs.',bill)
if choice1==14:
c1.execute("select
your_destination,date_booked from customer_bookings where
phone_number like '"+str(a)+"';")
data=c1.fetchall()
for row in data:
print(row[0],'- {',row[1],'}')
conn.commit()
import sys
sys.exit()
18
if choice!=14 and 12 and 13:
print()
print()
print("********************INVALID
CHOICE**********************")
import sys
sys.exit()
if choice==2:
phone_number=int(input('Phone Number='))
name=str(input('Name='))
password =str(input( 'password[10]='))
c1.execute("insert into
accounts(Phone_number,password,name )values(" +
str(phone_number) +",'" +password + "',' "+name+" ')")
conn.commit()
print('Account sucessfully Created')
import sys
sys.exit()
if choice==3:
phone_number=int(input("enter your phone_number="))
c1.execute("delete from customer_bookings where
phone_number ="+str(phone_number)+";")
c1.execute("delete from accounts where phone_number
="+str(phone_number)+";")
conn.commit()
print()
19
print("**************************************SUCCESSFULLY
ACCOUNT DELETED**************************************")
import sys
sys.exit()
if choice==4:
import sys
sys.exit()
if choice!=1 and 2 and 3:
print()
print()
print("********************INVALID
CHOICE**********************")
20
OUTPUT
1.
2.
21
3.
4.
22
HARDWARE AND SOFTWARE REQUIREMENTS
I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE
II. PROCESSOR : PENTIUM(ANY) OR AMD
ATHALON(3800+- 4200+ DUAL CORE)
III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI
K9MM-V VIA K8M800+8237R PLUS
CHIPSET FOR AMD ATHALON
IV. RAM : 512MB+
V. Hard disk : SATA 40 GB OR ABOVE
VI. CD/DVD r/w multi drive combo: (If back up required)
VII. FLOPPY DRIVE 1.44 MB : (If Backup required)
VIII. MONITOR 14.1 or 15 -17 inch
IX. Key board and mouse
X. Printer : (if print is required – [Hard copy])
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python.
INSTALATION PROCEDURE
DAILY TRAVEL BOOKING :-
Pre-Requisites :-
23
1. You have to have the following softwares for the successful running of this
software; which are
I) Python (Only for the First time), it is downloadable from
'www.python.org'.
II) MySQL (Only for the First time), it is downloadable from
'www.mysql.org'.
Installation :-
1. There will be two folders namely 'Python Files' and 'EXE files'.
2. The folder 'Python Files' will contain the source code of the software in python
language. If you are running the software by the 3rd step mentioned below you have
to pre install the following modules :-
I) mysql.connector
II) matplotlib.
3. Open the files in any python editors and run it to start and work on the
software.
4. The folder 'EXE files' will contain two files namely 'main.exe' and
'Tables_in_mysql.exe'.
24
5. First run the 'Tables_in_mysql.exe' to create the tables in MySQL.
1. Then run the file 'main.exe' to start and work on the software.
CAUTION :-
If you are running the software through running the python files or by running
the .exe files ; first run the file named 'Tables_in_mysql'.
The .exe file will take a lot of time; so be PATIENT.
BIBLIOGRAPHY
1. Computer science With Python - Class XII
2. A Project Report On DAILY TRAVEL BOOKING
25
3. By : Dipankar Sonawane
4. Website: https://www.w3resource.com
***
26