Recap of Booleans

What We’ve Covered So Far

To declare a boolean:

To declare a boolean with a value:

To assign a boolean value: The values you will find in a boolean are true/false, 1/0 and HIGH/LOW. Using logic to switch a boolean value:  

Questions and Activities to Try

1. Practice using boolean values- true/false, 1/0 and HIGH/LOW in conversation. When someone asks you a question and the answer is “yes” you can answer “true,” “one” or “high.” Just remember to switch back to regular ol’ yes and no once you’re done with this activity so people who don’t work with robots can understand you. If you want you can even add a weird robotic voice when you practice using boolean values.

2. Think about things in your regular life that can have a boolean value. Here are a couple examples: A light being on or off, awake or not awake, and  a coin being heads or tail. It’s actually kind of tough to think of boolean examples since they really need to be true or false. Questions such as, “is it hot out?” don’t have a yes or no answer since it starts to get hot slowly and you can’t really tell exactly when it got hot. Make a list of qualities or questions that are boolean and discuss them with others. Be prepared to defend your questions or qualities that people might not see as boolean.  

Next Step:

Now that you’ve learned about boolean variables we’ll step it up to variables that have more than two values.

Next Lesson – Integers