0% found this document useful (0 votes)
28 views14 pages

Investigatory Project Cs

Uploaded by

botgamer084
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views14 pages

Investigatory Project Cs

Uploaded by

botgamer084
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 14

INVESTIGATORY

PROJECT
COMPUTER
SCIENCE
TABLE OF
CONTENTS
S.No. Topic Page No.
1 Project Synopsis 5
2 Objective 7
3 Requirements 8
4 References 9
5 General Information 10
6 Code
7 Output
ACKNOWLEDGEM
ENT
I would like to express my greatest
appreciation to the all individuals who have
helped and supported me throughout the
project. I am thankful to my computer
teacher for her ongoing support during the
project, from initial advice, and
encouragement, which led to the final report
of this project.

I would also like to thank my fellow team


members for their teamwork and
determination due to which we were able to
complete this project.

A special acknowledgement goes to my


classmates who helped me in completing
the project by exchanging interesting ideas
and sharing their experience.
I wish to thank my parents as well for their
undivided support and interest who inspired
me and encouraged me to go my own way,
without whom I would be unable to
complete my project.

At the end, I want to thank my friends who


displayed appreciation to my work and
motivated me to continue my work.

PROJECT
SYNOPSIS
TITLE OF PROJECT
Travel Booking System

DEFINITION
Travel Booking System is an all in one application
designed and programmed with the sole aim of
helping the users to book a travel to
Contribution / Team
members:
The role wise composition of our team was:

Sarvagya Joshi (The Thinker): Thought of the various ideas


which served as the base for our program such as Topics i.e
Calculator, Database Management system etc.

Devansh Vats (The Coder): Came up with the rough sketches


of the program’s GUI and wrote all the involved codes &
integrated MYSQL & Python to give life to the skeleton of the
program.
Reason for choosing the
Topic:
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.
SOURCE CODE
DATABASE CREATION:
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
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='))

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

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()

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=')

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()

if choice!=14 and 12 and 13:

print()

You might also like