wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Binary File

Total questions: 15

Worksheet time: 12mins

Name
Class
Date
1.

Mode refer to binary data

a)

w

b)

b

c)

+

d)

a

2.

Mode used for reading and writing in binary file

a)

wb

b)

w

c)

wb+

d)

w+

3.

Function used to write data in binary format

a)

write()

b)

output()

c)

load()

d)

dump()

4.

The type of operation possible in an opened file is governed by

a)

File Object

b)

File Mode

c)

File Path

d)

open() Method

5.

The other name for file object is

(a)  

6.

Module used to read and write into binary files

a)

dump

b)

load

c)

pickle

d)

open

7.

Method used to read data from a binary file

(a)  

8.

Conversion of an object hierarchy in byte stream is

(a)  

9.

File path from the topmost level of the directory structure

(a)  

10.

File path relative to current working directory

(a)  

11.

Writing onto a binary file using dump() performs

(a)  

12.

Reading from a binary file using dump() method performs

(a)  

13.

Function returns the current position of file pointer in the file

a)

tell()

b)

seek()

c)

read()

d)

flush()

14.

Which function places the file pointer at the specified position in the open file

(a)  

15.

Statements which can handle runtime exceptions

(a)