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 what the six relational operators mean and that a relational expression always has type boolean. (Guide: “The six relational operators”; Practice question 1)
- I can explain the difference between
=and==. (Guide: “Two errors the compiler catches”; Practice question 7) - I can explain why
3 < x < 9does not compile. (Guide: “Two errors the compiler catches”; Practice questions 2 and 10) - I can explain why computed doubles should not be compared with
==. (Guide: “Round-off error and doubles”; Practice question 6)
Skills
- I can evaluate a Boolean expression that mixes arithmetic and a relational operator. (Guide: Figure 1 and Worked example 1; Practice questions 4 and 9)
- I can predict the result of a comparison that involves integer division. (Guide: “Integer division inside a comparison”; Practice questions 3 and 9)
- I can translate an English condition into a Boolean expression, choosing the correct boundary operator. (Guide: Worked example 2; Practice questions 5 and 8)
- I can store a Boolean expression in a boolean variable. (Guide: “Boolean variables”; Practice question 4)
Reasoning
- I can find and fix the errors in a line that misuses
=, chains comparisons or compares doubles exactly. (Practice questions 7 and 10) - I can check a Boolean expression with a value on the boundary (for example, exactly 18 for “at least 18”). (Guide: Worked example 2; Practice question 5)
- I can say how a program should test two doubles for being “close enough”. (Guide: “Round-off error and doubles”; Practice question 6)
All ticked? Move on to the Topic 2.3 study guide, if Statements.