Font size
WorksheetsPython
Total questions: 10
Worksheet time: 6mins
Which is not a text file?
data.txt
data.csv
data.rft
data.mp3
Which file is not binary file?
student.mp4
student.jpeg
student.csv
student.exe
Which function read single line at a time?
read()
read(n)
readline()
readlines()
Which memory is volatile memory?
RAM
Hard Disk
CD
Pen drive
Mode in the following program to open file for writing in a mode where new data will be added at the end of old data
file =open("poem.txt","__")
r
a
w
x
Which function is used to read records from a binary file?
pickle.load(f)
pickle.read()
pickle.open()
pickle.dump(l,f)
Which statement(s) is/are true to open a binary file "Record.dat" for reading and writing.
file =open("Record.dat","wb")
file =open("Record.dat","rb")
file =open("Record.dat","ab")
file =open("Record.dat","rb+")
To read all the file contents in form of a list , (a) method is used.
What will be the output-
f=open('abc.txt','a')
text="xyz"
f.write(text)
f.close()
Writing into the file without erasing old content
Writing into the file by erasing old content
reading from the file without erasing old content
reading from the file by erasing old content
