Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

Hey guys,
For getPixel function in the zelle book there is an example
Which uses
red, green, blue = flowerImage.getPixel(32, 18)
Is that a correct variable to use?

asked in CSC201 Spring 2021 by (1 point)

2 Answers

+4 votes

I think it is correct because flowerImage.getPixel() returns a list of the values of red, green, blue colors.

answered by (1 point)
+3 votes

no. I'm not sure that would run, and even if it did, it definitely is not good style. something like pixelColor or maybe flowerColorList would be a lot better.

answered by (1 point)
...