import csv def add(): f1=open("data.csv","w",newline="\n") a=csv.writer(f1) L=[] for i in range(0,5,1): name=input("enter your name") rollno=int(input("enter your roll no.")) marks=int(input("enter your marks")) L=[name,rollno,marks] a.writerow(L) f1.close() def show(): f=open("data.csv","r") a=csv.reader(f) print("students who have scored more than 90 marks are:") for i in a: print(i) f.close() def search90(): f=open("data.csv","r") a=csv.reader(f) print("students who have scored more than 90 marks are:") for i in a: if int(i[2])>90: print(i[0]) f.close() import pickle l=[] found=0 def add_rec(): f=open("shoes.dat","ab") s_id=int(input("Enter Shoes ID:")) nm=input("Enter Name:") br=input("Enter Brand:") ty=input("Enter Type:") pr=int(input("Enter Price:")) l=[s_id,nm,br,ty,pr] pickle.dump(l,f) print("Record Added....") f.close() def dis_rec(): f=open("shoes.dat","rb") while True: try: l=pickle.load(f) print(l) except EOFError: f.close() break def search_record(): f=open("shoes.dat","rb") s_id=int(input("Enter Shoe ID:")) while True: try: l=pickle.load(f) if l[0]==s_id: found=1 print("Record Found...",l) else: found=0 except EOFError: f.close() break if found==0: print("Record Not Found...") while True: print('''1. Add Record 2. Display Record 3. Search Record 4. Exit ''') ch=int(input("Enter your choice:")) if ch==1: add_rec() elif ch==2: dis_rec() elif ch==3: search_record() elif ch==4: break else: print("Invalid Choice") ''' output 1. Add Record 2. Display Record 3. Search Record 4. Exit Enter your choice:1 Enter Shoes ID:1 Enter Name:eee Enter Brand:tata Enter Type:rr Enter Price:4567 Record Added.... 1. Add Record 2. Display Record 3. Search Record 4. Exit Enter your choice:2 [1, 'eee', 'tata', 'rr', 4567] 1. Add Record 2. Display Record 3. Search Record 4. Exit Enter your choice:3 Enter Shoe ID:1 Record Found... [1, 'eee', 'tata', 'rr', 4567] 1. Add Record 2. Display Record 3. Search Record 4. Exit Enter your choice:4 ''' ''' output 1. Add 2. Display all 3. search above 90 4. Exit Enter your choice:1 enter your nameewew enter your roll no.2 enter your marks67 enter your nameyuyu enter your roll no.3 enter your marks98 enter your nameeee enter your roll no.5 enter your marks76 enter your nameyyy enter your roll no.132 enter your marks93 enter your nameaaa enter your roll no.66 enter your marks84 1. Add 2. Display all 3. search above 90 4. Exit Enter your choice:2 students who have scored more than 90 marks are: ['ewew', '2', '67'] ['yuyu', '3', '98'] ['eee', '5', '76'] ['yyy', '132', '93'] ['aaa', '66', '84'] 1. Add 2. Display all 3. search above 90 4. Exit Enter your choice:3 students who have scored more than 90 marks are: yuyu yyy 1. Add 2. Display all 3. search above 90 4. Exit Enter your choice:4 '''