page-banner
Chapter-7 File Processing
Q16.
स्टेटमेंट 3 के लिए उत्तर चुनें

Choose the answer for statement 3.
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
A. unpickle
B. pickle
C. write
D. None of above
View Answer
Q17.
स्टेटमेंट 1 के लिए उत्तर चुनें

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
A. csv
B. load
C. pickle
D. unpickle
View Answer
Q18.
रिक्त स्थान को भरें।

Fill in the blank.
import pickle
f=open("data.dat", "rb")
d=____________.load(f)
f.close()
A. unpickle
B. pickling
C. pickle
D. pick
View Answer
Q19.
निम्नलिखित पंक्ति को फंक्शनल बनाने के लिए कौन सा मॉड्यूल इम्पोर्ट किया जाना चाहिए

Which module to be imported to make the following line functional
sys.stdout.write("ABC")
A. system
B. stdin
C. stdout
D. sys
View Answer
Q20.
स्टेटमेंट 2 के लिए उत्तर चुनें।

Choose the answer for statement 2.
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
A. w
B. wb
C. w+
D. write
View Answer

Create Account