Write a python program to search and display the record of the student from a binary file “Student.dat” containing students records (Rollno, Name and Marks). Roll number of the student to be searched will be entered by the user
Answers
Answered by
4
Answer:
import pickle
def addrec():
fobj=open("student.dat","ab")
rollno=int(input("Roll Number : "))
sname=input("Student Name :")
rec=[rollno,sname]
pickle.dump(rec,fobj)
fobj.close()
addrec()
Explanation:
Similar questions
English,
15 days ago
History,
1 month ago
Social Sciences,
1 month ago
History,
9 months ago
English,
9 months ago