-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmmis.py
63 lines (52 loc) · 1.38 KB
/
admmis.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
class admission:
def __init__(self,i):
self.id=0
self.age=0
self.marks=0
def get_val(self):
self.id=int(input("ID:"))
self.age=int(input("age:"))
self.marks=int(input("marks:"))
l1=[]
l1.append(self.age)
l1.append(self.marks)
return l1
def validate_marks(self,x):
if(x>=0 and x<101):
return True
else:
return False
def validate_age(self,x):
if(x>20):
return True
else:
return False
def check_qualification(self,age,mark,x):
if(age==True and mark==True):
if(x>=65):
return True
else:
return False
else:
return False
def pri(self):
print("ID :",self.id)
print("Age :",self.age)
print("Marks :",self.marks)
a=[]
for i in range(2):
a.append(admission(i))
for i in range(2):
print("enter student details:")
l=a[i].get_val()
age=a[i].validate_age(l[0])
mark=a[i].validate_marks(l[1])
c=a[i].check_qualification(age,mark,l[1])
if(c==True):
print("Admission accepted")
else:
print("Admission denied")
for i in range(2):
a[i].pri()
admission_class.py
Displaying admission_class.py.