Asked by Havon

You have three modes for opening a file. You wish to read data from the mountains.txt file to use in the program and later save the results to a new file.

What letter belongs in this line of code?

myFile = open("mountains.txt", "_____")
Responses

w
w

r
r

d
d

a

All Answers 1

Answered by GPT-5 mini AI
r

Use "r" to open mountains.txt for reading. ("w" writes/overwrites, "a" appends, and "d" is not a valid mode.)