0% found this document useful (0 votes)
77 views23 pages

Air Ticket Reservation System

Uploaded by

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

Air Ticket Reservation System

Uploaded by

jonadavid008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CBSE - COMPUTER SCIENCE PROJECT

2023-2024

Project Report submitted to


All India Senior Secondary Practical Examination in
Computer Science
AIR TICKET RESERVATION
SYSTEM
Submitted by
[Link]
Grade XII
JANUARY – 2024
AIR TICKET
RESERVATION

Project by:
[Link]
CERTIFICATE

Certified to be the Bonafide Record of work done by A. AUXLIN


of Std XII in the Computer Science Lab of the MOUNT LITERA
ZEE SCHOOL, MYLAUDY, KANYAKUMARI, during the year 2023 –
2024.

Date: Internal Examiner

REGISTER NO. ____________________


Submitted for All India Senior Secondary Practical Examination in
Computer Science held on ______________________________at
Mount Litera Zee School, Mylaudy.

Principal External Examiner


ACKNOWLEDGEMENT
It is my pleasant duty to acknowledge my sincere

gratitude and heartfelt thanks to all those who encouraged,

guided and helped me in the completion and retirement of this

report. I’m very indebted to [Link] PREYA Ma’am for

giving me her kind consent to undertake my project report and

for directing and guiding my work and providing me with all

the necessary encouragement. It gives me great pleasure to

acknowledge my humble indebtedness to my School Chairman

[Link] CHELVAM, Principal S. DEEPASELVI for

providing me excellent facilities and encouragement despite of

their multiple responsibilities.

Also I would like to thank my parents, family

members and friends who helped me to complete this project

successfully.
TABLE OF CONTENT

1. OVERVIEW OF PYTHON AND ITS VARIOUS OBJECTS


2. PROJECT DESCRIPTION
3. FUCNTIONS USED
4. SOURCE CODE
5. SAMPLE OUTPUT
6. CONCLUSION
7. BIBLIOGRAPHY
1. OVERVIEW OF PYTHON AND ITS
VARIOUS OBJECTS

Python is an interpreted, object-oriented, high-level programming


language with dynamic semantics. Its high-level built in data structures,
combined with dynamic typing and dynamic binding, make it very attractive for
Rapid Application Development, as well as for use as a scripting or glue
language to connect existing components together. Python's simple, easy to
learn syntax emphasizes readability and therefore reduces the cost of program
maintenance. Python supports modules and packages, which encourages
program modularity and code reuse. The Python interpreter and the extensive
standard library are available in source or binary form without charge for all
major platforms, and can be freely distributed.
Somewhat more formally, in Python, data takes the form
of objects—either built-in object that Python provides, or objects we create
using Python or external language tools such as C extension libraries. Although
we’ll firm up this definition later, objects are essentially just pieces of memory,
with values and sets of associated operations.
1. Programs are composed of modules.
2. Modules contain statements.
3. Statements contain expressions.
4. Expressions creates and process objects
5. Built-in objects make programs easy to write. For simple tasks, built-in
types are often all you need to represent the structure of problem domains.
Because you get powerful tools such as collections (lists) and search tables
(dictionaries) for free, you can use them immediately. You can get a lot of
work done with Python’s built-in object types alone.

1
6. Built-in objects are components of extensions. For more complex tasks,
you still may need to provide your own objects, using Python classes or C
language interfaces. But as you’ll see in later parts of this book, objects
implemented manually are often built on top of built-in types such as lists
and dictionaries. For instance, a stack data structure may be implemented as
a class that manages or customizes a built-in list.
7. Built-in objects are often more efficient than custom data structures.
Python’s built-in types employ already optimized data structure algorithms
that are implemented in C for speed. Although you can write similar object
types on your own, you’ll usually be hard-pressed to get the level of
performance built-in object types provide.
8. Built-in objects are a standard part of the language. In some ways,
Python borrows both from languages that rely on built-in tools (e.g., LISP)
and languages that rely on the programmer to provide tool implementations
or frameworks of their own (e.g., C++). Although you can implement unique
object types in Python, you don’t need to do so just to get started. Moreover,
because Python’s built-ins are standard, they’re always the same; proprietary
frameworks, on the other hand, tend to differ from site to site.
9. Easy-to-learn − Python has few keywords, simple structure, and a clearly
defined syntax. This allows the student to pick up the language quickly.
[Link]-to-read − Python code is more clearly defined and visible to the eyes.
[Link]-to-maintain − Python's source code is fairly easy-to-maintain.
12.A broad standard library − Python's bulk of the library is very portable
and cross-platform compatible on UNIX, Windows, and Macintosh.
[Link] Mode − Python has support for an interactive mode which
allows interactive testing and debugging of snippets of code.
[Link] − Python can run on a wide variety of hardware platforms and has
the same interface on all platforms.

2
[Link] − You can add low-level modules to the Python interpreter.
These modules enable programmers to add to or customize their tools to be
more efficient.
[Link] − Python provides interfaces to all major commercial databases.
[Link] Programming − Python supports GUI applications that can be created
and ported to many system calls, libraries and windows systems, such as
Windows MFC, Macintosh, and the X Window system of Unix.
[Link] − Python provides a better structure and support for large programs
than shell scripting.

Python too supports file handling and allows users to handle files
i.e., to read and write files, along with many other file handling options, to
operate on files. The concept of file handling has stretched over various other
languages, but the implementation is either complicated or lengthy, but alike
other concepts of Python, this concept here is also easy and short. Python treats
file differently as text or binary and this is important. Each line of code includes
a sequence of characters and they form text file. Each line of a file is terminated
with a special character, called the EOL or End of Line characters like comma
{,} or newline character. It ends the current line and tells the interpreter a new
one has begun. Let’s start with Reading and Writing files. There are also
various other functions that help to manipulate the files and its contents. One
can explore various other functions in Python Docs.

3
2. PROJECT DESCRIPTION

Scope of the project:


The main objective of the python project on Air ticket reservation is to manage
the details of booking, payments, seats, and flights. The project is totally built
at administrative end and only administrator is guaranteed the access. The
purpose of the project is to build an application program to reduce the manual
work for managing the booking, discounts, seats, and payments. It tracks all the
details about seats, flight, and payments; it also prints various reports as per
input given by the user.

Functional Features:
1. All the fields such as flight payments discounts are validated and does
not take invalid values.
2. Each form of sales, discounts, bookings cannot accept the blank values.
3. Avoiding errors in data.
4. Controlling amount of input.

Technology Used:
• Windows OS
• Python
• mysql connector module
• CSV file for storing data

4
3. FUCNTIONS USED

Functions Description
def registercust(): This function lets the user to input
basic information such as name,
address etc.
def classtypeview(): This function lets the user to know
the class type from which he or she
can choose
def ticketprice(): This function lets the user to choose
the ticket according to his/her
credentials
def menuview(): This function gives a variety to
choose from and alternatives in each
type of dishes.
def lugagebill(): This function lets the user to view
rate for lugage
def ticketamount(): This function returns the total amount
including food bill and luggage bill
def Menuset(): This function allows us to select a
function we wish to perform
def runagain(): This function re-runs the program
from beginning

5
4. SOURCE CODE

import os
import platform
import [Link]
import pandas as pd
import datetime
mydb = [Link](user=’root’, password=’12345’,
host=’localhost’, database=’air’)
mycursor=[Link]()
def registercust():
L=[]
name=input(“enter name:”)
[Link](name)
addr=input(“enter address:”)
[Link](addr)
jr_date=input(“enter date of journey:”)
[Link](jr_date)
source=input(“enter source:”)
[Link](source)
destination=input(“enter destination:”)
[Link](destination)
cust=(L)
sql=”insert into
pdata(custname,addr,jrdate,source,destination)values(%s,%s,%s,%s,%s)”
[Link](sql,cust)

6
[Link]()
def classtypeview():
print(“Do you want to see class type available : Enter 1 for yes :”)
ch=int(input(“enter your choice:”))
if ch==1:
sql=”select * from classtype”
[Link](sql)
rows=[Link]()
for x in rows:
print(x)
def ticketprice():
print (“We have the following rooms for you:-“)
print (“1. type First class---->rs 6000 PN\-“)
print (“2. type Business class---->rs 4000 PN\-“)
print (“3. type Economy class---->rs 2000 PN\-“)
x=int(input(“Enter Your Choice Please->”))
n=int(input(“No of passenger:”))
if(x==1):
print (“you have opted First class”)
s=6000*n
elif (x==2):
print (“you have opted Business class”)
s=4000*n
elif (x==3):
print (“you have opted Economy class”)
s=2000*n
else:

7
print (“please choose a class type”)
print (“your room rent is =”,s,”\n”)
def menuview():
print(“Do you want to see menu available : Enter 1 for yes :”)
ch=int(input(“enter your choice:”))
if ch==1:
sql=”select * from food”
[Link](sql)
rows=[Link]()
for x in rows:
print(x)
def orderitem():
global s
print(“Do yoy want to see menu available : Enter 1 for yes :”)
ch=int(input(“enter your choice:”))
ifch==1:
sql=”select * from food”
[Link](sql)
rows=[Link]()
for x in rows:
print(x)
print(“do you want to purchase from above list:enter your choice:”)
d=int(input(“enter your choice:”))
if(d==1):
print(“you have ordered tea”)
a=int(input(“enter quantity”))
s=10*a

8
print(“your amount for tea is “,s,”\n”)
elif (d==2):
print(“you have ordered coffee”)
a=int(input(“enter quantity”))
s=10*a
print(“your amount for coffee is :”,s,”\n”)
elif(d==3):
print(“you have ordered colddrink”)
a=int(input(“enter quantity”))
s=20*a
print(“your amount for colddrink is :”,s,”\n”)
elif(d==4):
print(“you have ordered samosa”)
a=int(input(“enter quantity”))
s=10*a
print(“your amount fopr samosa is :”,s,”\n”)
elif(d==5):
print(“you have ordered sandwich”)
a=int(input(“enter quantity”))
s=50*a
print(“your amount for sandwich is :”,s,”\n”)
elif(d==6):
print(“you have ordered dhokla”)
a=int(input(“enter quantity”))
s=30*a
print(“your amount for dhokla is :”,s,”\n”)
elif(d==7):

9
print(“you have ordered kachori”)
a=int(input(“enter quantity”))
s=10*a
print(“your amount for kachori is :”,s,”\n”;)
elif(d==8):
print(“you have ordered milk”)
a=int(input(“enter quantity”))
s=20*a
print(“your amount for kachori is :”,s,”\n”)
elif(d==9):
print(“you have ordered noodles”)
a=int(input(“enter quantity”))
s=50*a
print(“your amount for noodles is :”,s,”\n”)
elif(d==10):
print(“you have ordered pasta”)
a=int(input(“enter quantity”))
s=50*a
print(“your amount for pasta is :”,s,”\n”)
else:
print("please enter your choice from the menu")
def lugagebill():
global z
print(“Do yoy want to see rate for lugage : Enter 1 for yes :”)
ch=int(input(“enter your choice:”))
if ch==1:
sql=”select * from luggage”

10
[Link](sql)
rows=[Link]()
for x in rows:
print(x)
y=int(input(“Enter Your weight of extra lugage->”))
z=y*1000
print(“your laundarybill:”,z,”\n”)
return z
def lb():
print(z)
def res():
print(s)
def ticketamount():
a=input(“enter customer name:”)
print(“customer name :”,a,”\n”)
print(“lugage bill:”)
print(lb)
print(“food bill:”)
print(“total amount”)
def Menuset():
print(“AIR TICKET RESERVATION”)
print(“enter 1: To enter customer data”)
print(“enter 2 : To view class”)
print(“enter 3 : for ticketamount”)
print(“enter 4 : for viewing food menu”)
print(“enter 5 : for food bill”)
print(“enter 6 :for lugage bill”)

11
print(“enter 7 : for complete amount”)
print(“enter 8 : for exit”)
‘’’try:
#userinput=int(input(“please select an above option:”))
except ValueError:
exit(“\n hi thats not a number”)’’’
userinput=int(input(“enter your choice”))
if(userinput==1):
registercust()
elif(userinput==2):
classtypeview()
elif(userinput==3):
ticketprice()
elif(userinput==4):
menuview()
elif(userinput==5):
orderitem()
elif(userinput==6):
lugagebill()
elif(userinput==7):
ticketamount()
elif(userinput==8):
quit()
else:
print(“enter correct choice”)
Menuset()
def runagain():

12
runagn=input(“\n want to run again y/n:”)
while([Link]()==’y’):
if([Link]()==”windows”):
print([Link](‘cls’))
else:
print([Link](‘clear’))
Menuset()
runagn=input(“\n want to run again y/n:”)
runagain()

13
[Link] OUTPUT

14
15
16
[Link]
In conclusion, the airline reservation system is successfully designed and
implemented with the intension to limit manual operations. This system is user
friendly and very much flexible to non-programmers.

The system will be used in searching, retrieving and generating processed


information for the concerned request. With this proposed system errors are
reduced due to human intervention and conveniently maintains any
modifications to the flight and cancellations in the reservations made at any
point of time.

It not only provides flight details but also creates a platform to book tickets
online, cancels or modifies ticket timings or dates and even informs about the
number of people available on board and seats that are already booked.

17
[Link]
• Sumita Arora
• [Link]
• [Link]

18

You might also like