Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question # 4 multiple choice you are going to open a file in your progr…

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.

Explanation:

Brief Explanations

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.

Answer:

You can use the relative path to a subfolder within the folder where the program is saved.