A.Opening a file in read mode performs which operation?

 

a. Creates a new file                        b. Reads consecutive characters from a file

c. Reads all the content of a file     d. None of the above

B.  If we have to open a fi le abc.txt using the statement

Fp1 = open(‘abc.txt’,’r’)

which statement will read the file into memory?

a. Fp2 = open(Fp1)      b. FP1.Open.read(Fp1)

c. Fp1.read()                d. None of the above

C. The inbuilt method readlines() is used to:

a. Read an entire file as a string                       b. Read one line at a time

c. Read each line in a file as an item in a list    d. None of the above

D.  If the statement Fp1 = open(‘demo.txt’,’r’) is used to open a fi le demo.txt in read mode then which statement will be used to read 5 string characters from a fi le into memory?

a. Ch = fp1.read[:10] b. Ch = fp.read(6)

c. Ch = fp.read(5) d. All of the above

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!