Fill in the blanks in the following code of writing data in binary files. Choose the answer for statement 1 import ___________ # Statement 1 rec = [ ] while True: rn = int(input("Enter")) nm = input("Enter") temp = [rn, nm] rec.append(temp) ch = input("Enter choice (Y/N)") if ch.upper == "N": break f = open("stud.dat", "____________") #statement 2 __________ .dump(rec, f) #statement 3 _______.close( ) # statement 4

Question:
Fill in the blanks in the following code of writing data in binary files. Choose the answer for statement 1
import ___________   # Statement 1
rec = [ ]
while True:
     rn = int(input("Enter"))
     nm = input("Enter")
     temp = [rn, nm]
     rec.append(temp)
     ch = input("Enter choice (Y/N)")
     if ch.upper == "N":
          break
f = open("stud.dat", "____________")  #statement 2
__________ .dump(rec, f)   #statement 3
_______.close( ) # statement 4

1.csv

2.unpickle

3.pickle

4.load

Posted Date:-2021-12-12 06:40:51


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!