-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path135 prog.py
39 lines (36 loc) · 894 Bytes
/
135 prog.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
print("enter the number of persons")
a=int(input())
list1=[]
list2=[]
list3=[]
list4=[]
for i in range(0,a):
print("enter name")
name=input()
print("enter book published")
book=input()
list1.append(name)
list4.append(book)
#print(list1,list2,list3,list4)
class person:
def __init__(self,l1,l2):
self.l1=l1
self.l2=l2
def display(self):
print("name of faculty :")
for i in self.l1:
print(i)
def display2(self):
print("name of books publications :")
for i in self.l2:
print(i)
class faculty(person):
def __init__(self,l1,l2):
person.__init__(self,l1,l2)
class publication(person):
def __init__(self,l1,l2):
person.__init__(self,l1,l2)
obj1=faculty(list1,list4)
obj1.display()
obj2=publication(list1,list4)
obj2.display2()