Put a temporary print statement as the first statement in the convert function to print out imageFileName. imageFileName is a string storing the complete file name of the image that you chose using the file dialog. That file name ends in .gif.
You need to create a new file name identical to imageFileName except that the extension needs to be .art instead of .gif. That new file name is the file that you will write to so you need to use the open function with the new file name and "w" for writing to that file.
Think about the string operations/functions/methods that we know that will allow you to manipulate the string which is imageFileName to the new string that you need for the new file name.