You are supposed to write the convert function, not use it.
Googling is rarely useful for this class. In terms of the textbook, look for the sections about writing to a text file, because the .art file is really just a plain text file written in a specific format.
In terms of figuring out how to get the file name (which is just a string of text) to end in .art instead of .gif, Thu's answer is good.