Question: You will write a mainFn() that takes one argument, either gray or color and in it it will let me pickAFile() and it will run

  • You will write a mainFn() that takes one argument, either "gray" or "color" and in it it will let me pickAFile() and it will run one or the other of the two sub-functions that do the actual negation/grayconversion-negation on the image of my choice. Note that this means that in the mainFn() if I enter: mainFn("color") it will run the first sub-function and convert and display a color negative to me, and if I run mainFn("gray") it will run the second sub-function and will convert and display to me a grayscale negative of the image. If I enter an argument other that "gray" or "color" it will print to the command area that I must enter either "gray" or "color".Sub function 1. It will get the picture you pass from the mainFn() and will convert it to color negative of the image and show() me the result. (I think show() is a better function to use that explore() in this case).Sub function 2: Creates a grayscale negative of the image. If you then call the negative function (from inside of this function after it has been grayed, it will convert the grayscale image to a negative grayscale image and from inside of there you can again show() the image.

Programming language: python in JES (Jython)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!