-
Notifications
You must be signed in to change notification settings - Fork 104
/
HH Airlines.py
111 lines (111 loc) · 4.61 KB
/
HH Airlines.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import openpyxl
def flight():
airline=openpyxl.load_workbook("G:\\SIMPLE_AIRLINE_BOOKING_SYSTEM_IN_PYTHON_WITH_SOURCE_CODE\\SimpleAirlinesBookingSystem_PYTHON\\Airline-Booking-System\\Book1.xlsx")
opt_1= 'Return'
opt_2= 'Oneway'
print(opt_1)
print(opt_2)
opt = input("Select opt_1 or opt_2:")
if opt == opt_1:
fro = input("From which state:")
to = input("To which state:")
depart_date = input("Enter Departure Date:")
return_date = input("Enter Return Date:")
passengers_Qty =int(input("Enter Passenger Quantity:"))
cabin = input("Enter Cabin:")
sh2=airline['FLIGHT']
dt1 = sh2['A2'].value = fro
dt2 = sh2['B2'].value = to
dt3 = sh2['C2'].value = depart_date
dt4 = sh2['D2'].value = return_date
dt5 = sh2['E2'].value = passengers_Qty
dt6 = sh2['F2'].value = cabin
sh1=airline['Return']
row=sh1.max_row
column=sh1.max_column
for i in range(1,row):
for j in range(1,column):
b=sh1.cell(i,j).value
if b == 'Available':
print(sh1.cell(i,1).value,sh1.cell(1,j).value,sh1.cell(i,j).value)
Depart_Date2=input("Now Enter Your Departure Date:")
Return_Date2=input("Now Enter Return Date:")
payment=int(50000*passengers_Qty)
if passengers_Qty > 1:
count=1
while count<= passengers_Qty:
Fst_Name =input("Enter First Name:")
last_Name = input("Enter Last Name:")
Sur_Name = input("Enter your SurName:")
D_O_B = input("Enter Your Date Of Birth:")
Nationality = input("Enter Your Nationality:")
Psp_loc = Nationality
Psp_No = input("Enter Your Passport Number:")
Psp_Exp = input("Enter expiry Date Of Passport:")
Phone_No = input("Enter Your Phone Number:")
E_mail = input("Enter Your Email Address:")
home_add = input("Enter Your Home address:")
count+=1
else:
Fst_Name = input("Enter First Name:")
last_Name = input("Enter Last Name:")
Sur_Name = input("Enter your SurName:")
D_O_B = input("Enter Your Date Of Birth:")
Nationality = input("Enter Your Nationality:")
Psp_loc = Nationality
Psp_No = input("Enter Your Passport Number:")
Psp_Exp = input("Enter expiry Date Of Passport:")
Phone_No = input("Enter Your Phone Number:")
E_mail = input("Enter Your Email Address:")
home_add = input("Enter Your Home address:")
print('')
print('')
print('')
print('PNR_NO :',2679054)
print('Flight_NO :',747974298)
Name=str(Fst_Name)+str(Sur_Name)
print(Name)
print('Rs',payment)
print('Passport Location:',Psp_loc)
print('Departure Date :',Depart_Date2)
print('Return Date :',Return_Date2)
elif opt == opt_2:
fro = input("From which state:")
to = input("To which state:")
depart_date = input("Enter Departure Date:")
passengers_Qty = input("Enter Passenger Quantity:")
cabin = input("Enter Cabin:")
sh1 = airline['Oneway']
row = sh1.max_row
column = sh1.max_column
for i in range(1, row+1):
for j in range(1, column+1):
b = sh1.cell(i, j).value
if b == 'Available':
print(sh1.cell(i, 1).value,b)
Depart_Date2 = input("Now Enter Departure Date:")
payment = 30000 * passengers_Qty
Fst_Name = input("Enter First Name:")
last_Name = input("Enter Last Name:")
Sur_Name = input("Enter your SurName:")
D_O_B = input("Enter Your Date Of Birth:")
Nationality = input("Enter Your Nationality:")
Psp_loc = Nationality
Psp_No = input("Enter Your Passport Number:")
Psp_Exp = input("Enter expiry Date Of Passport:")
Phone_No = input("Enter Your Phone Number:")
E_mail = input("Enter Your Email Address:")
home_add = input("Enter Your Home address:")
print('')
print('')
print('')
print('PNR_NO :', 2679054)
print('Flight_NO :', 747974298)
print(Fst_Name + Sur_Name)
print('Rs', payment)
print('Passport Location:', Psp_loc)
print('Departure Date :', Depart_Date2)
else:
print('invalid')
#driverscode
flight()