You are creating a function that reads a data file and prints each line of the file. You write the following code. Line numbers are included for reference only The code attempts to read the file even...



You are creating a function that reads a data file and prints each line of the file.


You write the following code. Line numbers are included for reference only



The code attempts to read the file even if the file does not exist.


SEE PHOTO


You need to correct the code.


Which three lines have indentation problems? Each correct answer presents part of the solution. (Choose three.)



Group of answer choices

Line 04



Line 03



Line 05



Line 02



Line 06



Line 07



Line 01



Line 08



01 import os<br>02 def read_file(file):<br>03<br>line = None<br>if os.path.isfile(file):<br>data = open(file, 'r')<br>while line !=

Extracted text: 01 import os 02 def read_file(file): 03 line = None if os.path.isfile(file): data = open(file, 'r') while line != ": line = print (line) 04 05 06 e7 data.readline () 08 |

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here