Explanation:w is used to indicate that file is to be written to. 3. To open a file c:\scores.txt for appending data, we use
A. outfile = open(“c:\\scores.txt”, “a”)
B. outfile = open(“c:\\scores.txt”, “rw”)
C. outfile = open(file = “c:\scores.txt”, “w”)
D. outfile = open(file = “c:\\scores.txt”, “w”)
Answer:A
Explanation:w is used to indicate that file is to be written to. 3. To open a file c:\scores.txt for appending data, we use
A. outfile = open(“c:\\scores.txt”, “a”) B. outfile = open(“c:\\scores.txt”, “rw”) C. outfile = open(file = “c:\scores.txt”, “w”) D. outfile = open(file = “c:\\scores.txt”, “w”)
Explanation:a is used to indicate that data is to be apended. 4. Which of the following statements are true? (multiple answers allowed)