-
Notifications
You must be signed in to change notification settings - Fork 0
/
b.py
111 lines (90 loc) · 3.1 KB
/
b.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
catagories = ('18 years or above students', 'Citizen registration (25 years or above)', 'Military forces (Police/Army/BGB)', 'Health Service (Doctors/Nurse/Others)', 'Bankers', 'Farmers', 'Freedom Fighter', 'Educational Organization', 'Elected Parliament Member', 'Workers')
print('Please Select a Catagory: \n')
for (i, item) in enumerate(catagories, start=1):
print(i, item)
print()
choice = int(input('Please enter a value : '))
print()
if choice == 1:
catagory = '18 years or above students'
elif choice == 2:
catagory = 'Citizen registration (25 years or above)'
elif choice == 3:
catagory = 'Military forces (Police/Army/BGB)'
elif choice == 4:
catagory = 'Health Service (Doctors/Nurse/Others)'
elif choice == 5:
catagory = 'Bankers'
elif choice == 6:
catagory = 'Farmers'
elif choice == 7:
catagory = 'Freedom Fighter'
elif choice == 8:
catagory = 'Educational Organization'
elif choice == 8:
catagory = 'Elected Parliament Member'
elif choice == 8:
catagory = 'Workers'
else:
print('Wrong input')
class Person:
def __init__(self, catagory, name, age, phone, vc, vaccine):
self.catagory = catagory
self.name = name
self.age = age
self.phone = phone
self.vc = vc
self.vaccine = vaccine
def display(self):
print("Catagory: ", self.catagory)
print("Name: ", self.name)
print("Age: ", self.age)
print("Phone Num: ", self.phone)
print("Vaccination Center: ", self.vc)
print("Vaccination Name: ", self.vaccine)
def registration(self):
print('**********************************************************')
print("Congratulation! Your 1st dose of vaccination is completed.")
print('**********************************************************')
self.display()
if self.catagory != 'Military forces (Police/Army/BGB)' or 'Health Service (Doctors/Nurse/Others)':
print('Sorry! This feature is not available')
else:
print('\nYou can change your centre')
print('Stay Safe!\nStay Home!')
print('')
name = input('Enter name: ')
dob = input('(Format : 01/01/2000) Enter dob: ')
phone = input('Enter phone: ')
age = 2021 - int(dob[6:10])
centres = ('Barisal', 'Chittagong', 'Dhaka', 'Khulna', 'Mymensingh', 'Rajshahi', 'Rangpur', 'Sylhet')
print('Please Select a Centre: \n')
for (i, item) in enumerate(centres, start=1):
print(i, item)
print()
choice = int(input('Please enter a value : '))
print()
if choice == 1:
vc = 'Barisal'
elif choice == 2:
vc = 'Chittagong'
elif choice == 3:
vc = 'Dhaka'
elif choice == 4:
vc = 'Khulna'
elif choice == 5:
vc = 'Mymensingh'
elif choice == 6:
vc = 'Rajshahi'
elif choice == 7:
vc = 'Rangpur'
elif choice == 8:
vc = 'Sylhet'
else:
print('Wrong input')
if vc == 'Dhaka' or 'Chittagong':
vaccine = 'Mordena'
else:
vaccine = 'Sinopharm'
p = Person(catagory, name, age, phone, vc, vaccine)
p.registration()