To open a file c:\scores.txt for reading, we use
Answer:
The syntax to open a file in python is as follows:
file_object= open(file_name, access_mode)
Here,
-
the
file_namewill bec:\\scores.txt -
The file should be opened for
reading
, so
access_modeis“r”.
Therefore, the correct answer will be
infile = open(“c:\\scores.txt”, “r”)
So, the correct answer is (b).