Given this code: if (mouseX < pmouseX && mouseY > pmouseY) { background(128); } else { background(0); } Fill in this table to show what the background color will be for the given values mouseX pmouseX mouseY pmouseY color 50 40 70 60 60 30 20 90 30 50 40 10 20 80 50 75 I am not sure how this is figured out in processing.
I'm not really sure what you're doing, but looking at it is seems like you would either fill it with 128 or 0. For the first one it shows mouseX is > pmouse x and mouseY is above pmouseY soit's a 0. I guess the rest will be filled out as well..
yahh, just like what KonradZuse says. If mouseX < pmouseX & mouseY > pmouseY then the color would be 0. Other than that, the color will be 128. So look at line 3, mouseX is less than pmouseX but mouseY is greater than pmouseY so that makes the color 128.
The color part is given to you. The code says if mouseX < pmouseX & mouseY > pmouseY then the color would be 0 because the code says "background(0)" which is black & the other case is "background(128)" which is Idk which color.
Join our real-time social learning platform and learn together with your friends!