1 / 9

ICM

ICM. Conditionals. Conditionals. If p then q If it is raining then I will stay inside If it is not raining then I will go outside If it is sunny and warm then I will go to the beach. Conditionals. If (condition) then e lse then. Conditionals. If else Allow BRANCHING.

lesley-love
Télécharger la présentation

ICM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ICM Conditionals

  2. Conditionals • If p then q • If it is raining then I will stay inside • If it is not raining then I will go outside • If it is sunny and warm then I will go to the beach

  3. Conditionals • If (condition) then • else then

  4. Conditionals • If • else • Allow BRANCHING

  5. Conditionals if (mouseX < 100){ println(“mouseX is less than 100”); } else { println(“mouseX is greater than or equal to 100”); }

  6. Boolean Logic • boolean x = true;

  7. Boolean Logic • ! – not • == - equality • && - and • || - or

  8. Boolean Logic • < - less than • > - greater than • <= - less than or equal to • >= - greater than or equal to

  9. Boolean Logic • Truth tables

More Related