-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpython gui project.py
206 lines (201 loc) · 9.46 KB
/
python gui project.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
from tkinter import *
from tkinter import messagebox
from tkinter import ttk
def exitapp():
root.destroy()
def placebutton(x):
y= entry.get()
if x == 1 :
root3=Tk()
root3.geometry('350x50')
z=int(y)*22000
Label(root3,text='COST FOR ' +y+ ' OF JAMMU KASHMIR IS : ' +str(z)).pack()
root3.mainloop()
elif x == 2:
root3=Tk()
root3.geometry('350x50')
z=int(y)*25000
Label(root3,text='COST FOR ' +y+ ' OF UTTAR PRADESH IS : ' +str(z)).pack()
root3.mainloop()
elif x == 3:
root3=Tk()
root3.geometry('350x50')
z=int(y)*27000
Label(root3,text='COST FOR ' +y+ ' OF MADHYA PRADESH IS : ' +str(z)).pack()
root3.mainloop()
elif x == 4:
root3=Tk()
root3.geometry('350x50')
z=int(y)*50000
Label(root3,text='COST FOR ' +y+ ' OF DELHI IS : ' +str(z)).pack()
root3.mainloop()
def region(y,w):
if y == 1 and w == 1:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR NORTH ARE:').pack()
Button(root2,text='1.JAMMU AND KASHMIR',command=lambda:placebutton(1)).pack()
Button(root2,text='2.UTTAR PRADESH',command=lambda:placebutton(2)).pack()
Button(root2,text='3.MADHYA PRADESH',command=lambda:placebutton(3)).pack()
Button(root2,text='4.DELHI',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 2 and w == 1 :
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR SOUTH ARE:').pack()
Button(root2,text='1.KERELA',command=lambda:placebutton(1)).pack()
Button(root2,text='2.KARNATAKA',command=lambda:placebutton(2)).pack()
Button(root2,text='3.TAMIL NADU',command=lambda:placebutton(3)).pack()
Button(root2,text='4.ANDAMAN',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 3 and w == 1:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR EAST ARE:').pack()
Button(root2,text='1.MANIPUR',command=lambda:placebutton(1)).pack()
Button(root2,text='2.SIKKIM',command=lambda:placebutton(2)).pack()
Button(root2,text='3.WEST BENGAL',command=lambda:placebutton(3)).pack()
Button(root2,text='4.ASSAM',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 4 and w == 1:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR WEST ARE:').pack()
Button(root2,text='1.GUJRAT',command=lambda:placebutton(1)).pack()
Button(root2,text='2.MAHARASTRA',command=lambda:placebutton(2)).pack()
Button(root2,text='3.GOA',command=lambda:placebutton(3)).pack()
Button(root2,text='4.RAJASTHAN',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 1 and w == 2:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR NORTH ARE:').pack()
Button(root2,text='1.JAMMU AND KASHMIR',command=lambda:placebutton(1)).pack()
Button(root2,text='2.UTTAR PRADESH',command=lambda:placebutton(2)).pack()
Button(root2,text='3.MADHYA PRADESH',command=lambda:placebutton(3)).pack()
Button(root2,text='4.DELHI',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 2 and w == 2 :
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR SOUTH ARE:').pack()
Button(root2,text='1.KERELA',command=lambda:placebutton(1)).pack()
Button(root2,text='2.KARNATAKA',command=lambda:placebutton(2)).pack()
Button(root2,text='3.TAMIL NADU',command=lambda:placebutton(3)).pack()
Button(root2,text='4.ANDAMAN',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 3 and w == 2:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR EAST ARE:').pack()
Button(root2,text='1.MANIPUR',command=lambda:placebutton(1)).pack()
Button(root2,text='2.SIKKIM',command=lambda:placebutton(2)).pack()
Button(root2,text='3.WEST BENGAL',command=lambda:placebutton(3)).pack()
Button(root2,text='4.ASSAM',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 4 and w == 2:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR WEST ARE:').pack()
Button(root2,text='1.GUJRAT',command=lambda:placebutton(1)).pack()
Button(root2,text='2.MAHARASTRA',command=lambda:placebutton(2)).pack()
Button(root2,text='3.GOA',command=lambda:placebutton(3)).pack()
Button(root2,text='4.RAJASTHAN',command=lambda:placebutton(4)).pack()
Button(root1,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 1 and w == 3:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR NORTH ARE:').pack()
Button(root2,text='1.JAMMU AND KASHMIR',command=lambda:placebutton(1)).pack()
Button(root2,text='2.UTTAR PRADESH',command=lambda:placebutton(2)).pack()
Button(root2,text='3.MADHYA PRADESH',command=lambda:placebutton(3)).pack()
Button(root2,text='4.DELHI',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 2 and w == 3 :
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR SOUTH ARE:').pack()
Button(root2,text='1.KERELA',command=lambda:placebutton(1)).pack()
Button(root2,text='2.KARNATAKA',command=lambda:placebutton(2)).pack()
Button(root2,text='3.TAMIL NADU',command=lambda:placebutton(3)).pack()
Button(root2,text='4.ANDAMAN',command=lambda:placebutton(4)).pack()
Button(root2,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 3 and w == 3:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR EAST ARE:').pack()
Button(root2,text='1.MANIPUR',command=lambda:placebutton(1)).pack()
Button(root2,text='2.SIKKIM',command=lambda:placebutton(2)).pack()
Button(root2,text='3.WEST BENGAL',command=lambda:placebutton(3)).pack()
Button(root2,text='4.ASSAM',command=lambda:placebutton(4)).pack()
Button(root1,text='BACK',command=root2.destroy).pack()
root2.mainloop()
elif y == 4 and w == 3:
root2=Tk()
root2.geometry('200x200')
Label(root2,text='OPTIONS FOR WEST ARE:').pack()
Button(root2,text='1.GUJRAT',command=lambda:placebutton(1)).pack()
Button(root2,text='2.MAHARASTRA',command=lambda:placebutton(2)).pack()
Button(root2,text='3.GOA',command=lambda:placebutton(3)).pack()
Button(root2,text='4.RAJASTHAN',command=lambda:placebutton(4)).pack()
Button(root1,text='BACK',command=root2.destroy).pack()
root2.mainloop()
def package(w):
root1=Tk()
root1.geometry('300x300')
if w == 1:
Label(root1,text='WELCOME TO SILVER PACKAGE').pack()
Label(root1,text='SILVER PACKAGE:\nFACILITIES IN SILVER PACKAGE ARE:-\n-6N/7D\n-3 Star hotel accomodation\n- Airport transfer\n-breakfast\n-sight seeing\n').pack()
Button(root1,text='NORTH',command=lambda:region(1,1)).pack()
Button(root1,text='SOUTH',command=lambda:region(2,1)).pack()
Button(root1,text='EAST',command=lambda:region(3,1)).pack()
Button(root1,text='WEST',command=lambda:region(4,1)).pack()
Button(root1,text='BACK',command=root1.destroy).pack()
root.mainloop()
elif w == 2:
Label(root1,text='WELCOME TO GOLD PACKAGE').pack()
Label(root1,text='nFACILITIES IN GOLD PACKAGE ARE:-\n-6N/7D\n-4 Star hotel accomodation\n-Airport transfer\n- breakfast&dinner\n-sight seeing\n').pack()
Button(root1,text='NORTH',command=lambda:region(1,2)).pack()
Button(root1,text='SOUTH',command=lambda:region(2,2)).pack()
Button(root1,text='EAST',command=lambda:region(3,2)).pack()
Button(root1,text='WEST',command=lambda:region(4,2)).pack()
Button(root1,text='BACK',command=root1.destroy).pack()
root.mainloop()
elif w == 3:
Label(root1,text='WELCOME TO PLATINIUM PACKAGE').pack()
Label(root1,text='nFACILITIES IN PLATINUM PACKAGE ARE:-\n-6N/7D\n-5 or 7 Star hotel\n-Airport transfer\n-breakfast,lunch&dinner \n-sight seeing \n').pack()
Button(root1,text='NORTH',command=lambda:region(1,3)).pack()
Button(root1,text='SOUTH',command=lambda:region(2,3)).pack()
Button(root1,text='EAST',command=lambda:region(3,3)).pack()
Button(root1,text='WEST',command=lambda:region(4,3)).pack()
Button(root1,text='BACK',command=root1.destroy).pack()
root.mainloop()
def select():
root0=Tk()
root0.geometry('400x400')
Label(root0,text='Please select the package',padx=400).pack()
ttk.Button(root0,text='SILVER',command=lambda:package(1)).pack()
ttk.Button(root0,text='GOLD',command=lambda:package(2)).pack()
ttk.Button(root0,text='PLATINUIM',command=lambda:package(3)).pack()
ttk.Button(root0,text='BACK',command=root0.destroy).pack()
ttk.Button(root0,text='EXIT',command = exitapp).pack()
root=Tk()
root.config(bg='LIGHT BLUE')
root.geometry('400x400')
Label(root,text=' WELCOME ',bg = 'LIGHT YELLOW',padx = 400,pady = 25).pack()
Label(root,text='ENTER NO. OF PASSENGERS',padx=400).pack()
entry = Entry(root,bg='LIGHT BLUE',fg = 'BLUE')
entry.pack()
ttk.Button(root,text='CONITNUE',command = select).pack()
ttk.Button(root,text='EXIT',command = exitapp).pack()
root.mainloop()