Do Now #16 – What is Boolean Logic?
———————OBJECTIVE(S)—————————
Lesson 11:
I CAN predict the output of simple Boolean statements.
I CAN use conditionals to react to changes in variables and sprite properties.
Lesson 12:
I CAN use conditionals to react to keyboard input.
I CAN move sprites in response to keyboard input.
———————-ASSIGNMENT—————————
1. Complete Lesson 11, share your work from Puzzle 12 (L11P12) on Google Classroom.
2. Complete Lesson 12, share your work from Puzzle 9 (L11P12)on Google Classroom.
Boolean Expressions
The simplest Boolean expressions are questions that the computer can answer with true or false. These expressions are made using comparison operators, as shown below.
Note: If you saw the statement 3 < 2 in math class, you’d think something was terribly wrong, but this is not math class. In computer science, the comparison operators ask a question that the computer will answer with true
or false
. So you can read 3 < 2 as “Is 3 less than 2?” The answer in this case is no, or false
.
Another way to say this is that the Boolean expression 3 < 2
evaluates to false
.