Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

0 votes

I see the convert method has a parameter imageFileName, but what is it for?

asked ago in CSC201 by (4.2k points)

1 Answer

0 votes

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.

answered ago by (4.2k points)
...