DS
DS
def __init__(self,name,rollno,m1,m2):
self.name = name
self.rollno = rollno
self.m1 = m1
self.m2 = m2
def accept(self,ab):
print("Name\tRoll No.\tMark1\tMark2)
print(ob.name\tob.rollno\tob.m1\tobm2)
print("\n")
def search(self,rn):
for i in range(ls.__len__()):
if(ls[i].rollno == rn):
return i
def delete(self.rn):
i = obj.search(rn)
del ls[i]
def update(self,rn,No):
i = obj.search(rn)
roll = No
ls[i].rollno = roll;
ls = []
obj = Student('', 0, 0, 0)
print("Operations used.")
print("1. Accept Student Details\n2. Display Student Details\n
3. Search Details of a Student\n4. Delete Details of Student\n
5. Update Student Details\n6. Exit")