X1009: Conditionally Adding to a List

The method below takes in two parameters: a Pixel object called p and a List called list. For this method, if the list has less than 20 items in it, add the pixel to the end of the list. Whether or not the pixel is added, the list passed in as a parameter should then be returned.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.