Question
The function colorToGrayscale(picture) is supposed to take a JES picture object and return a grayscale copy of it. It uses an auxiliary function RGB2Y(c) which
The function colorToGrayscale(picture) is supposed to take a JES picture object and return a grayscale copy of it. It uses an auxiliary function RGB2Y(c) which takes a color(!) c and returns a color of equivalent grayscale. The intended use of the main function on the command line is show(colorToGrayscale(picture)). (4 points) The program as written has an error. Both functions are syntactically correct, but an error is caused in the auxiliary function. Analyze the error message carefully. Find and fix any mistake(s) that prohibit the program from functioning as intended.
this is python
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started