Introduction to Selection: If/ElseActivities & Teaching Strategies
Active learning works for teaching selection because students must act out logic, not just hear it. When Year 6 students physically sort conditions or trace sprite paths, they confront the binary nature of if/else decisions in ways a slide cannot match. Movement and collaboration make abstract branching concrete before they code it.
Learning Objectives
- 1Explain how an 'if/else' statement controls program execution based on a condition.
- 2Predict the output of a simple program containing a single 'if/else' structure.
- 3Design a short program that uses an 'if/else' statement to alter a character's behavior or appearance.
- 4Compare the execution paths of two programs, one with an 'if/else' and one without, given the same input.
Want a complete lesson plan with these objectives? Generate a Mission →
Unplugged: Condition Card Sort
Provide cards with conditions, true/false outcomes, and actions. Pairs arrange them into if/else flows for scenarios like a game's win condition. Pairs then translate one flow into Scratch code and test it. Discuss variations as a class.
Prepare & details
Explain how an 'if/else' statement directs the flow of a program.
Facilitation Tip: During Condition Card Sort, give every pair a timer so they must justify their sort aloud before moving on.
Setup: Standard classroom, flexible for group activities during class
Materials: Pre-class content (video/reading with guiding questions), Readiness check or entrance ticket, In-class application activity, Reflection journal
Pair Programming: Sprite Decisions
In Scratch, pairs code a sprite that changes costume if a variable exceeds 5 or plays sound otherwise. They add a loop for repetition. Pairs swap codes to predict and debug partner versions.
Prepare & details
Predict the outcome of a simple program with a single 'if/else' condition.
Facilitation Tip: When Pair Programming Sprite Decisions, circulate with a checklist to ensure both partners speak each line of code before typing.
Setup: Standard classroom, flexible for group activities during class
Materials: Pre-class content (video/reading with guiding questions), Readiness check or entrance ticket, In-class application activity, Reflection journal
Small Groups: Game Branch Challenge
Groups modify a shared Scratch game template: use if/else for score-based messages or enemy avoidance. Test against classmates, record bugs, and refine. Present one working branch to the class.
Prepare & details
Design a program where a character changes appearance based on a simple condition.
Facilitation Tip: In the Game Branch Challenge, ask each group to present one branch’s purpose before allowing them to test, building reasoning before action.
Setup: Standard classroom, flexible for group activities during class
Materials: Pre-class content (video/reading with guiding questions), Readiness check or entrance ticket, In-class application activity, Reflection journal
Whole Class: Prediction Walkthrough
Display code snippets with if/else on the board or shared screen. Class votes on outcomes step-by-step, then runs in Scratch to verify. Volunteers explain flow corrections.
Prepare & details
Explain how an 'if/else' statement directs the flow of a program.
Setup: Standard classroom, flexible for group activities during class
Materials: Pre-class content (video/reading with guiding questions), Readiness check or entrance ticket, In-class application activity, Reflection journal
Teaching This Topic
Teach if/else by making prediction the norm, not the exception. Ask students to sketch possible paths on paper before running code, using arrows to show which branch fires. Emphasize mutual exclusivity by having them place a finger on the condition and move it only along the path that matches. Keep mini-lessons under five minutes and let misconceptions surface in the activities where students can correct them together.
What to Expect
Successful learning looks like students confidently explaining why only one branch runs, correcting peers’ logic errors, and adjusting code to change outcomes. They should predict paths, debug mismatches, and justify reordering of statements without prompting.
These activities are a starting point. A full mission is the experience.
- Complete facilitation script with teacher dialogue
- Printable student materials, ready for class
- Differentiation strategies for every learner
Watch Out for These Misconceptions
Common MisconceptionDuring Pair Programming: Sprite Decisions, watch for students who assume both branches will run if the condition is close to true.
What to Teach Instead
Have partners trace the code on paper first, drawing a single arrow along the path that matches the condition’s true or false result before they code.
Common MisconceptionDuring Condition Card Sort, watch for students who pair ‘if’ statements with any card, ignoring whether it evaluates to true or false.
What to Teach Instead
Ask students to read each condition aloud and circle only those that produce a clear true or false outcome before sorting.
Common MisconceptionDuring Game Branch Challenge, watch for students who think reordering if/else statements has no effect on outcomes.
What to Teach Instead
Require groups to rearrange their code twice, each time predicting the branch that will run, and note how the order changes behavior.
Assessment Ideas
After Pair Programming: Sprite Decisions, display a snippet with two possible branches. Ask students to write on a sticky note which branch will run for a given condition and why.
After Condition Card Sort, give students a new condition and two message blocks. Ask them to place the messages under the correct branch and justify their choice in one sentence.
During Whole Class: Prediction Walkthrough, pose a scenario like a character changing costume on collision. Ask students to vote by show of hands whether the change happens in the ‘if’ or ‘else’ branch, then discuss the majority answer.
Extensions & Scaffolding
- Challenge: Add nested if/else inside the Game Branch Challenge to create a second level of decision.
- Scaffolding: Provide pre-written condition cards with blanks for students to fill in during the Unplugged sort.
- Deeper exploration: Invite students to design a quiz game with multiple if/else conditions and present it to another class.
Key Vocabulary
| if/else statement | A programming structure that checks a condition. If the condition is true, one block of code runs; otherwise, a different block of code runs. |
| condition | A statement that can be evaluated as either true or false, used to make decisions in a program. |
| program flow | The order in which instructions are executed in a program. 'If/else' statements create branching paths in this flow. |
| branching | Creating different paths in a program's execution based on whether a condition is met. 'If/else' statements are a form of branching. |
Suggested Methodologies
More in Complex Variables and Game Mechanics
Introduction to Variables: Storing Information
Students learn the fundamental concept of variables as containers for storing different types of data within a program.
2 methodologies
Changing States with Variables
Students investigate how updating variable values can alter the state and behavior of a program or game.
2 methodologies
Sensing User Input with Variables
Students learn to use sensing blocks and variables to capture and respond to user interactions like keyboard presses or mouse clicks.
2 methodologies
Complex Scoring Systems
Students apply their understanding of variables to create sophisticated scoring mechanisms in games, including bonuses and penalties.
2 methodologies
Nested Selection and Multiple Conditions
Students explore how to use nested 'if' statements and combine conditions with 'AND' and 'OR' to create more complex decision-making logic.
2 methodologies
Ready to teach Introduction to Selection: If/Else?
Generate a full mission with everything you need
Generate a Mission