Question: What does each of the following programs do? (A) file = open('text.dot', 'r')) (B) 0 a file.readline() while a: a = file.readline() 1-0 print
What does each of the following programs do? (A) file = open('text.dot', 'r')) (B) 0 a file.readline() while a: a = file.readline() 1-0 print (output ",1, 1-1+1 file.close() file-open('text.dat', 'r') while 1: d- file.readline() print ("output ",1, ": 1=1+1 file.close() a)
Step by Step Solution
3.39 Rating (152 Votes )
There are 3 Steps involved in it
A 1file opentextdot r This line opens a file named textdot in readonly mode r and assigns the file object to the variable file It allows you to read t... View full answer
Get step-by-step solutions from verified subject matter experts
