QUESTION IMAGE
Question
question # 4
multiple choice
you are going to open a file in your program.
afile = open(\___\,
\)
which statement is true about what goes in the blank?
you must use backward slashes.
you can use the relative path to a subfolder within the folder where the program is saved.
the text file must be in the same folder as the program.
the full path needs to be provided.
In programming, when using the open function to open a file, you can use a relative path to a sub - folder within the folder where the program is saved. You don't have to use backward slashes (forward slashes can also work in many cases, especially in cross - platform scenarios). The file doesn't have to be in the same folder as the program, and a full path isn't always necessary if using relative paths.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
You can use the relative path to a subfolder within the folder where the program is saved.