Conditionals.

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Conditionals Art &Technology, 3rd Semester Aalborg University Programming David Meredith
Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
Boolean Algebra Discussion D6.1 Sections 13-3 – 13-6.
BOOLEAN LOGIC CSC 171 FALL 2004 LECTURE 7. ASSIGNMENT Review Quiz # 2 Start reading Chapter 5.
Boolean Algebra Discussion D6.1 Appendix G. Boolean Algebra and Logic Equations George Boole Boolean Algebra Theorems Venn Diagrams.
Boolean Algebra Discussion D2.2. Boolean Algebra and Logic Equations George Boole Switching Algebra Theorems Venn Diagrams.
Geography 465 Assignments, Conditionals, and Loops.
A Brief Biography of George Boole
Data Types. Every program must deal with data The data is usually described as a certain type This type determines what you can do with the data and how.
New Mexico Computer Science For All Booleans and Logic Maureen Psaila-Dombrowski.
Computer Science 101 Boolean Algebra. What’s next? A new type of algebra – Helps us A new type of algebra – Helps us With logical reasoningWith logical.
22C:19 Discrete Math Boolean Algebra & Digital Logic Fall 2010 Sukumar Ghosh.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
CSci 125 Lecture 10 Martin van Bommel. Simple Statements Expression followed by semicolon Assignments total = n1 + n2; Function calls printf(”Hello.\n”);
Boolean expressions Conditional statements and expressions.
Computer Science 101 The Boolean System. George Boole British mathematician ( ) Boolean algebra –Logic –Set theory –Circuits –Conditions in if.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
CSC 107 – Programming For Science. Follow-Up From Last Lecture.
An Introduction to Programming Using Alice Boolean Logic.
Chapter 8 Conditionals. Learning Java through Alice © Daly and Wrigley Objectives List relational operators. List logical operators. Use the hierarchy.
1. We’ve learned that our programs are read by the compiler in order, from top to bottom, just as they are written The order of statement execution is.
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Valeria Urquijo Boolean Operators March 4, 2010
Selection Boolean What is Boolean ? Boolean is a set with only two values : –true –false true and false are standard identifiers in Pascal, called Boolean.
CSC 107 – Programming For Science. Announcements.
A-Level Computing#BristolMet Session Objectives#6 MUST understand and produce simple logic diagrams using the operations NOT, AND and OR SHOULD explain.
Boolean Operators Are You Connected? Presented by: (Insert Your Name Here)
CSC 107 – Programming For Science. George Boole  Mathematician from English middle-class  Lived from 1815 – 1864  Started work at age 16 as a teaching.
1 © 2002 John Urrutia. All rights reserved. Qbasic Chapter 4 IF Statements and READ & DATA.
Decision Structures and Boolean Variables. Sequence Structures Thus far, we’ve been programming “sequence structures” Thus far, we’ve been programming.
Section 3.4 Boolean Algebra. A link between:  Section 1.3: Logic Systems  Section 3.3: Set Systems Application:  Section 3.5: Logic Circuits in Computer.
CONDITIONALS. Boolean values Boolean value is either true or false It is name after the British mathemetician, George Boole who first formulated Boolean.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Computer Programming Boolean Logic Trade & Industrial Education
Appendix B: Digital Logic
Chapter 6 Conditionals. Learning Java through Alice © Daly and Wrigley Objectives List relational operators. List logical operators. Use the hierarchy.
Pascal Programming George Boole, a 19 th Century mathematician, is created with true, false logic. A Boolean expression in Pascal will be true or false.
Conditional statements and boolean expressions Arithmetic, relational and logical operators.
Types, Truth, and Expressions Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
Types, Truth, and Expressions Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg.
Random Functions Selection Structure Comparison Operators Logical Operator
 Type Called bool  Bool has only two possible values: True and False.
Computer Programming Boolean Logic.
Introduction to Decision Structures and Boolean Variables
CPS120 Introduction to Computer Science
Computer Science 210 Computer Organization
Chapter 6 Conditionals.
Information Technology Introduction to Number System
COMPUTING FUNDAMENTALS
4-1 LOGIC OPERATIONS In Chapter 3 we discussed the fact that data inside a computer is stored as patterns of bits. Logic operations refer to those operations.
JavaScript conditional
Aberdeen Grammar School
Introduction To Robot Decision Making
&& how we might use it in spreadsheets
JavaScript conditional
Bools and simple if statements
Computer Science 210 Computer Organization
Introduction to Decision Structures and Boolean Variables
Or how to put your search together by using connectors
Introduction To Robot Decision Making
Conditional Logic Presentation Name Course Name
Understanding Conditions
JavaScript conditional
ECS15 boolean.
George Boole English Mathematician
Computer Programming Boolean Logic Trade & Industrial Education
Millennium High School Agenda Calendar
Types, Truth, and Expressions
Chapter 6 Conditionals.
Presentation transcript:

Conditionals

Boolean Algebra

Boolean Logic Invented by George Boole Boolean logic is the basis for modern computer logic. Works only with binary values (that is two values) A cubby hole that holds either true or false George Boole was an english mathematician and philosopher. Born 1815, died 1864.

Is greater than or equal to Boolean expressions Operator Meaning == Is equal to != Is not equal > Is greater than < Is less than >= Is greater than or equal to <= Is less than or equal to Creates a Boolean value from numbers or strings

Conditionals

IF … THEN … ELSE if (MUST BE LOWERCASE) No else: do nothing if not true else: one or the other else if: nested function