Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.
Understanding
- I can state when
!a,a && banda || bare true. (Guide: “Combining true and false”; Practice question 1) - I can state the precedence of
!,&&and||. (Guide: “Precedence”; Practice question 2) - I can explain short-circuit evaluation for
&&and for||. (Guide: “Short-circuit evaluation”; Practice questions 4 and 5) - I can explain why
x == 1 || 2does not compile and whyx > 3 || x < 8is always true. (Guide: “Writing ranges”; Practice question 6)
Skills
- I can evaluate a compound Boolean expression for given values, showing each part. (Guide: Worked example 1; Practice questions 2 and 7)
- I can write a range test and an outside-the-range test. (Guide: “Writing ranges”; Practice questions 3 and 8)
- I can complete a truth table for an expression with three variables. (Practice question 9)
- I can translate rules with “and”, “or”, “unless” and “not” into one Boolean expression. (Guide: Worked example 2; Practice questions 8 and 10)
Reasoning
- I can use a guard on the left of
&&to make the right side safe. (Guide: “Short-circuit evaluation”; Practice question 5) - I can say which method calls in a compound condition are actually executed. (Practice question 4)
- I can explain how adding brackets changes the result of a condition. (Guide: Worked example 1, items 4 and 5; Practice question 10)
All ticked? Move on to the Topic 2.6 study guide, Comparing Boolean Expressions.