4
AssignmentMultiple Choice

Review: Programming Algorithms

Question 4 • Introduction to Computer Science B – 4-232

This line of code is in your program. outFile = open("filename.txt","a") What mode is being used?

Answer
A
read
B
write
C
append
D
insert

Explanation

The second argument, "a", opens the file in append mode. Append mode adds new content to the end of an existing file rather than replacing its contents, so the correct choice is append.

AI-written and checked against the verified answer.