Learn
Great job! You just learned about logic and boolean values, including:
- How to define variables with a
bool
data type - How to use comparison operators with different data types to return boolean values
- What a truth table is and how to read one
- How to use logical operators to compare boolean values and expressions
Now that you know a few things about boolean data types, comparison operators and logical operators, try writing a program that:
- Checks a password if it has uppercase letters and doesn’t include symbols
- Tells you if you should watch a TV show if it has your favorite actor or is your favorite drama
Instructions
Time for some practice! Use the code editor to play around with what you learned in this lesson. If you’re not sure what to do, try one of the extensions above!
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.