Skip to content
Marlbridge

AP® Computer Science A · Unit 2 · Topic 2.3

if Statements: Topic Checklist (Computer Science A 2.3)

Specific I can statements for one-way and two-way if statements, each linked to the guide section or practice question that tests it.

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 if statements 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 if that 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.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.