Font size
WorksheetsBinary File Handling Python
Total questions: 10
Worksheet time: 5mins
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 file execute faster?
Text file
Binary file
CSV file
Mode used for reading and writing in binary file
wb
w
wb+
w+
Function used to write data in binary format
write()
output()
load()
dump()
The type of operation possible in an opened file is governed by
File Object
File Mode
File Path
open() Method
Module used to read and write into binary files
dump
load
pickle
open
Function returns the current position of file pointer in the file
tell()
seek()
read()
flush()
The default file - open mode is (a) mode.
Which of the following is not a valid attribute of a file object (fp)?
fp.name
fp.closed
fp.size
fp.mode
How do you change the file position to an offset value from the start?
fp.seek(offset, 0)
fp.seek(offset, 1)
fp.seek(offset, 2)
none of the mentioned
