Professional Documents
Culture Documents
36 Samridh Singh Airline Management
36 Samridh Singh Airline Management
COMPUTER
SCIENCE PROJECT
NAME – SAMRIDH SINGH
CLASS – 12TH A
ROLL NUMBER - 36
1
Computer Science Project | Samridh Singh
Acknowledgement
2
Computer Science Project | Samridh Singh
Acknowledgement
3
Computer Science Project | Samridh Singh
Introduction
My project is based on Data file management
of Binary Files in python.
The Python Program is Called Airline
Passenger Management System.
It enables airlines to effectively and simply
manage their Passengers data.
4
Computer Science Project | Samridh Singh
5
Computer Science Project | Samridh Singh
6
Computer Science Project | Samridh Singh
Python Code
import pickle
import random
import sys
def airline():
File_1 = open('Passenger_Database_new1.dat', 'ab')
flight_no = int(input("Enter the Flight Number: "))
Name = input("Enter the Name of Passenger: ")
Ticket_Number = random.randint(100000, 999999)
Time_Departure = int(input("Enter the Time of Departure: "))
Time_Arrival = int(input("Enter the Time of Arrival: "))
Departure_City = input('Enter the Name of Departure City: ')
Arrival_City = input("Enter the Name of Arrival City: ")
pickle.dump(data, File_1)
7
Computer Science Project | Samridh Singh
pickle.dump('\n', File_1)
print("Successfully Made a ticket")
File_1.close()
def search():
Search = input("Do you want to view passenger's flight Information")
if Search == "Yes":
File_1 = open('Passenger_Database_new1.dat', 'rb')
m = pickle.load(File_1)
if m[1] == l:
print(m)
y=2
break
except:
8
Computer Science Project | Samridh Singh
File_1.close()
while True:
print("-------------------------------------------------------------")
print("-------------------------WELCOME-----------------------------")
print("------Welcome to the Airline Passenger management System-----")
print("-------------------------------------------------------------")
9
Computer Science Project | Samridh Singh
elif choice == 2:
search()
elif choice == 3:
File_1 = open('Passenger_Database_new1.dat', 'rb')
abc = pickle.load(File_1)
print(abc)
File_1.close()
elif choice == 4:
File_1 = open('Passenger_Database_new1.dat', 'wb')
flight_no = int(input("Enter the Flight Number: "))
Name = input("Enter the Name of Passenger: ")
Ticket_Number = random.randint(100000, 999999)
Time_Departure = int(input("Enter the Time of Departure: "))
Time_Arrival = int(input("Enter the Time of Arrival: "))
Departure_City = input('Enter the Name of Departure City: ')
Arrival_City = input("Enter the Name of Arrival City: ")
pickle.dump(data, File_1)
10
Computer Science Project | Samridh Singh
elif choice == 5:
sys.exit()
11
Computer Science Project | Samridh Singh
12
Computer Science Project | Samridh Singh
13
Computer Science Project | Samridh Singh
14
Computer Science Project | Samridh Singh
15
Computer Science Project | Samridh Singh
16