CS Project
CS Project
2 AFS PUNE
C.S.PROJECT
AIR TICKET RESERVATION
Subject: - Computer Science
(083)
PRADHUMAN KAMBLE
CERTIFICATE
Examiner signature
INDEX
1.Brief Overview of Project
2. Need for Computerization
3. Software and Hardware
requirement
4. Advantages of Project
5. Limitations of Project
6. Source Code of Project
7. Output Screens
8. Future Enhancement of Project
9. Bibliography
BRIEF OVERVIEW OF 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.
LIMITS
1. Excel export has not been developed for
bookings.
2.The transactions are executed in offline mode only.
3. Online transactions for sales, bookings, or other
data Modifications are not possible.
4. Offline reports of sales, bookings, and discounts
cannot Be generated due to batch mode execution.
def register_cust():
L = []
name = input("Enter name: ")
L.append(name)
addr = input("Enter address: ")
L.append(addr)
jr_date = input("Enter date of journey: ")
L.append(jr_date)
source = input("Enter source: ")
L.append(source)
destination = input("Enter destination: ")
L.append(destination)
cust = tuple(L)
sql = "INSERT INTO pdata (custname, addr, jrdate, source,
destination) VALUES (%s, %s, %s, %s, %s)"
mycursor.execute(sql, cust)
mydb.commit()
def class_type_view():
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"
mycursor.execute(sql)
rows = mycursor.fetchall()
for x in rows:
print(x)
def ticket_price():
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: "))
n = int(input("No of passengers: "))
if x == 1:
print("You have opted for First class")
s = 6000 * n
elif x == 2:
print("You have opted for Business class")
s = 4000 * n
elif x == 3:
print("You have opted for Economy class")
s = 2000 * n
else:
print("Please choose a class type")
s=0
print("Your room rent is =", s, "\n")
def menu_view():
print("Do you want to see the menu available? Enter 1 for
yes:")
ch = int(input("Enter your choice: "))
if ch == 1:
sql = "SELECT * FROM food"
mycursor.execute(sql)
rows = mycursor.fetchall()
for x in rows:
print(x)
def order_item():
global s
print("Do you want to see the menu available? Enter 1 for
yes:")
ch = int(input("Enter your choice: "))
if ch == 1:
sql = "SELECT * FROM food"
mycursor.execute(sql)
rows = mycursor.fetchall()
for x in rows:
print(x)
print("Do you want to purchase from the 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
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 cold drink")
a = int(input("Enter quantity: "))
s = 20 * a
print("Your amount for cold drink is:", s, "\n")
elif d == 4:
print("You have ordered samosa")
a = int(input("Enter quantity: "))
s = 10 * a
print("Your amount for 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:
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 milk 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 luggage_bill():
global z
print("Do you want to see the rate for luggage? Enter 1 for
yes:")
ch = int(input("Enter your choice: "))
if ch == 1:
sql = "SELECT * FROM luggage"
mycursor.execute(sql)
rows = mycursor.fetchall()
for x in rows:
print(x)
y = int(input("Enter the weight of extra luggage: "))
z = y * 1000
print("Your luggage bill:", z, "\n")
return z
def lb():
print(z)
def res():
print(s)
def ticket_amount():
a = input("Enter customer name: ")
print("Customer name:", a, "\n")
print("Luggage bill:")
lb()
print("Food bill:")
res()
print("Total amount")
def menu_set():
print("AIR TICKET RESERVATION")
print("Enter 1: To enter customer data")
print("Enter 2: To view class")
print("Enter 3: For ticket amount")
print("Enter 4: For viewing food menu")
print("Enter 5: For food bill")
print("Enter 6: For luggage bill")
print("Enter 7: For complete amount")
print("Enter 8: For exit")
try:
userinput = int(input("Enter your choice: "))
except ValueError:
exit("\nHi, that's not a number")
if userinput == 1:
register_cust()
elif userinput == 2:
class_type_view()
elif userinput == 3:
ticket_price()
elif userinput == 4:
menu_view()
elif userinput == 5:
order_item()
elif userinput == 6:
luggage_bill()
elif userinput == 7:
ticket_amount()
elif userinput == 8:
quit()
else:
print("Enter correct choice")
def run_again():
runagn = input("\nWant to run again y/n: ")
while runagn.lower() == 'y':
if platform.system() == "Windows":
os.system('cls')
else:
os.system('clear')
menu_set()
runagn = input("\nWant to run again y/n: ")
run_again()
OUTPUT SCREEN
Future Enhancements
1. The solutions are given as a proposal. The
suggestion Is revised on user request and optimal
changes are made. This loop terminates as soon
as the user is gratified with the proposal.
2. So on the whole, system analysis is done to
improve the system performance by monitoring it
and obtaining the best throughput possible from
it.Therefore system analysis plays a crucial role in
designing any system.
3. This is basically an interface of global distribute
system to carry out reservation on desired airline
from any place. Airline reservation system make
the life of passengers very easy as they don’t
need to stand in queues for getting their seats
reserved.
4. They can easily make reservation of any airline
just from a single system. On the other hand, it
also remove an extra burden from the Airline
Department as most of the passengers and travel
agencies use this service instead of making
reservations from the counters.
BIBLIOGRAPHY
1. http://www.google.com/
2. http://en.wikipedia.org