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 explain what a one-way selection does when its condition is false. (Guide: “One-way selection: if”; Practice question 1)
- I can explain that exactly one body runs in an if-else. (Guide: “Two-way selection: if-else”; Practice question 1)
- I can explain why two separate
ifstatements are not the same as an if-else. (Guide: “If-else is not two ifs”; Practice questions 2, 3 and 10) - I can explain what a stray semicolon after the condition does. (Guide: “The stray semicolon”; Practice question 4)
- I can explain which statements belong to an
ifthat has no braces. (Guide: “Braces and layout”; Practice question 5)
Skills
- I can write a correct one-way and two-way selection statement with a Boolean expression. (Guide: Worked example 1; Practice question 8)
- I can trace an if or if-else with a table of variable values. (Guide: “Tracing selection”; Practice questions 7 and 10)
- I can predict the output of a code segment with several selection statements in sequence. (Guide: Worked example 2; Practice questions 2, 3 and 7)
- I can rewrite an if-else with its condition reversed and the bodies swapped, using the exact complement. (Practice question 6)
Reasoning
- I can choose between an if-else and separate ifs for a given problem. (Guide: Worked example 1; Practice question 8)
- I can find and fix the errors in a faulty if statement (assignment for comparison, missing semicolon, else with a condition). (Practice question 9)
- I can check boundary values such as exactly 50 or exactly 10 kg. (Practice questions 8 and 9)
All ticked? Move on to the Topic 2.4 study guide, Nested if Statements.