Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

malibugranprix2000

  • 2 years ago

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.

  • This Question is Closed
  1. KonradZuse
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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..

  2. LoveJen
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  3. LoveJen
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  4. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.