Fall 2024 - P1
Big Idea 3 | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 | .10 |
3.5 Booleans Homework
Student led teaching on Booleans. Learn how booleans are used in decision-making with logical operators (like less than or greater than).
Homework Hacks 📕
Review the instructions and examples in the lesson and create a truth table using Python. Additionally look up and learn about De Morgan’s Law and see how it can be used to create a boolean expression.
Here is an example:
function deMorganLaw() {
console.log("A B Result");
let values = [false, true];
for (let A of values) {
for (let B of values) {
let result = !(A && B) === (!A || !B);
console.log(`${A} ${B} ${result}`);
}
}
}
deMorganLaw();
Result:
A B Result
false false true
false true true
true false true
true true true
Take a quiz
Test out your skills with this quiz.