-
Notifications
You must be signed in to change notification settings - Fork 0
/
WorldTrip.py
98 lines (89 loc) · 4.01 KB
/
WorldTrip.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
def trip():
print('------------------------------------------')
print(' Welcome To World Trip Tourism Management ')
print('------------------------------------------')
print(' Select the country from below\n ')
print(' 1. Singapore 2. India 3. France ')
opt = int(input(" Press 1 or 2 or 3 : "))
if opt==1:
print('Tourist places in Singapore\n')
sing()
elif opt==2:
print('Tourist places in India\n')
ind()
elif opt==3:
print('Tourist places in France\n')
fra()
else:
print("\nInvalid Option")
def sing():
print('+---------------------+--------------------+')
print('|Tourist Spot | Amount($) |')
print('+---------------------+--------------------+')
print('|1. Universal Studio | 45 |')
print('|2. Gardens by the Bay| 15 |')
print('|3. Singapore Flyer | 35 |')
print('|4. Night Safari | 25 |')
print('+---------------------+--------------------+')
places = ['Universal Studio ','Gardens by the Bay','Singapore Flyer ','Night Safari ']
money = [45,15,35,25]
final(places, money)
def ind():
print('+---------------------+--------------------+')
print('|Tourist Spot | Amount($) |')
print('+---------------------+--------------------+')
print('|1. Taj Mahal | 17 |')
print('|2. Red Fort | 16 |')
print('|3. Qutub Minar | 28 |')
print('|4. Fatehpur Sikhri | 37 |')
print('+---------------------+--------------------+')
places = ['Taj Mahal ','Red Fort ','Qutub Minar ','Fatehpur Sikhri ']
money = [17,16,28,37]
final(places, money)
def fra():
print('+---------------------+--------------------+')
print('|Tourist Spot | Amount($) |')
print('+---------------------+--------------------+')
print('|1. Eiffel Tower | 27 |')
print('|2. Louvre Museum | 20 |')
print('|3. Cruise | 17 |')
print('|4. Toot Bus | 40 |')
print('+---------------------+--------------------+')
places = ['Eiffel Tower ','Louvre Museum ','Cruise ','Toot Bus ']
money = [27,20,17,40]
final(places, money)
def final(places, money):
pl = input('Select the Places You want to Visit : ')
li = pl.split(',')#'1','4' --> 1 4
mem = int(input('Enter Number of Members :'))
dic = {}
for a in li:
if a=='1':
dic[places[0]]=money[0]#dic['universal studio']=45
elif a=='2':
dic[places[1]]=money[1]
elif a=='3':
dic[places[2]]=money[2]
elif a=='4':
dic[places[3]]=money[3]
billing(dic,mem)
def billing(dic,mem):
global fd,acc,ta
ta=0
print("\nPlaces You've Selected To Visit\n")
print('_____________________________________________________________________________\n')
print('+---------------------+--------------------+-------------+----------------+')
print('|Tourist Spot | Amount($) | Members | Total Amount |')
print('+---------------------+--------------------+-------------+----------------+')
for a in dic:
pl = mem*dic[a]
ta+=pl
fd = mem*500
acc = mem*1000
print('|',a,' |',' ',dic[a],' ','| ',mem,' |',' ',pl,' |')
print('| Food | 500 | ',mem,' | ',fd,' |')
print('| Accomodations | 1000 | ',mem,' | ',acc,' |')
print('|_____________________|____________________|_____________|________________|')
print('| Total Amount : ',ta+fd+acc,' |')
print('+---------------------+--------------------+-------------+----------------+')
trip()