5.3: Logical Operators: AND, OR – Processing Tutorial

[ad_1]
This video covers logical operators: && (logical AND) and II (logical OR) in the context of boolean expressions and conditional statements.

Support this channel on Patreon:

Contact:

Send me your questions and coding challenges!:

Link to code on Github:

Processing:
Processing Foundation:
Learning Processing Book:

For More Processing Tutorials:


Posted

in

by

Tags:

Comments

10 responses to “5.3: Logical Operators: AND, OR – Processing Tutorial”

  1. lizardking02793 Avatar

    Daniel, how do I make the or icon using my keyboard. I can't find the key for it, I've tried the letter "I" and the letter "L"

  2. Java Coder Avatar

    HERE IS THE EXERCISE FOR THE LAST VID 5.2 ENJOY! LOVE YOUR VIDS DAN!
    void draw() {
    background(200);
    //sectors
    if (mouseX < 320 && mouseY > 180) {
    fill(255, 0 , 0);
    rect(0, 180, 320, 180);
    } else if(mouseX < 320 && mouseY < 180) {
    fill(0, 0, 255);
    rect(0, 0, 320, 180);
    } else if (mouseX > 320 && mouseY > 180) {
    fill(0, 255, 0);
    rect(320, 180, 320, 180);
    } else {
    fill(255, 255,0);
    rect(320, 0, 320, 180);
    }

    //lines
    stroke(0, 0, 0);
    line(320, 0, 320, height);
    line(0, 180, 640, 180);
    }

  3. Felipe Paiser Avatar

    4:03 That time I remember what you said at the beggining "I'm not going to get sidetracked", but whatever it's cool. And Hello! from the future.

  4. tsmupdater tsm Avatar

    "One simpe topic" … "really short 2-3 minutes" …. and i see on the flash player 9:45 …. i like it.

  5. corey333p Avatar

    I'm a somewhat savvy coder in Python, so I know most of this basic stuff, but I continue watching your videos anyway. I figure this will be a good way to learn Processing and some Java. I wrote a pretty awesome fractal program [script?] in Python, I'm looking forward to doing similar cool things in Processing. Thanks for the great videos!

  6. Dassuo Avatar

    that wallpaper is making my eyes bleed

  7. Ben Daniels Avatar

    These videos are THE BEST! I love them.

  8. Brian Bossin Avatar

    at 7:16 shift = || on a windows keyboard

  9. Intermediate Coder Avatar

    Thank you so much! I have no idea what I would do without you! I have one question though. I am trying to make a very simple RPG. I have made "W,A,S,D" commands to move but I don't know how to make the character I have created(it is just an ellipse) stop moving when it hits the edge of the window. I have created the bouncy ball and stuff similar to that but how would I make something stop moving when it hits the edge of the window?

  10. SIMuTech Avatar

    So Daniel i stood up till 3am watching this chapter and im just about sleepy, i was thinking about a code but got stuck thinking how would it work? Ok so lets say Melissa comes home at 3 o clock and IF this is true ill say "wow ur home early" ELSE ? Say "hello Melissa ",…..NOW  i got stuck at what if she comes home earlier then 3 ? Would the code execute?  or would it execute the else?  how would this be written ? Since this is processing lets say the IF is a red box while the ELSE is a pink circle in draw() also i kno Melissa is a variable and all this is really a Boolean operation so i guess this is where im stuck, what value does Melissa needs to be ?

Leave a Reply

Your email address will not be published. Required fields are marked *