Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question #2 dropdown choose the character you would use in the blank fo…

Question

question #2
dropdown
choose the character you would use in the blank for the mode described.
open (\fruit.txt\,\____\)
to write to a new file, use
to read a file, use
to add text to an existing file, use

Explanation:

Brief Explanations

In Python, the 'open' function takes a mode parameter. 'w' is used to write to a new file, overwriting any existing content. 'r' is used to read a file. 'a' is used to append text to an existing file.

Answer:

To write to a new file, use: w
To read a file, use: r
To add text to an existing file, use: a