8.1 · Lesson 3 of 7
Selection: IF and CASE
Syllabus 8.1.3
What this lesson covers
- Use sequence, selection and iteration
Key vocabulary
- Selection
- Choosing which code to run based on a condition.
- IF statement
- Runs code only if a condition is TRUE, with optional ELSE code.
- Nested IF
- An IF statement inside another IF statement.
- CASE statement
- Checks one variable against a list of values and runs the code for the match.
- OTHERWISE
- The part of a CASE statement that runs if no value matches.
Check your learning
- Quick check: 4 questions
- Key vocabulary test: 5 terms
- Activity 1: What's the output? · 7 questions
- Activity 2: Selection quiz · 8 questions
- Activity 3: IF or CASE? · drag and drop