Visual Branching (If-Then Logic)
Exploring simple decision making in instructions using 'if-then' logic.
About This Topic
Visual branching introduces students to the concept of decision-making in algorithms. In Year 1, this is often explored through 'if-then' logic: *If* it is raining, *then* we play inside. This aligns with ACARA's focus on following and describing sequences of steps that involve decisions. It is the beginning of understanding how computers can seem 'smart' by reacting to different situations.
Students learn that a path can split based on a condition. This is a foundational concept for branching in stories, games, and programming. By using visual aids like flowcharts or physical 'choice paths' on the floor, students can see how a single choice changes the outcome. This topic is most engaging when students create their own 'choose your own adventure' style scenarios.
Key Questions
- Explain how we decide to wear a coat based on the weather.
- Predict what instruction a robot should follow if it hits a wall.
- Analyze how choices change the path we take in a story.
Learning Objectives
- Identify the condition and the action in a given 'if-then' statement.
- Explain how a choice in a visual branching scenario leads to a different outcome.
- Create a simple visual branching story with at least two decision points.
- Analyze how changing a condition in an 'if-then' statement alters the sequence of instructions.
Before You Start
Why: Students need to be able to follow and describe a series of steps in order before they can understand how decisions alter that sequence.
Why: Recognizing patterns helps students identify conditions and outcomes, which is fundamental to understanding 'if-then' logic.
Key Vocabulary
| If-Then Logic | A statement that describes a condition (if) and what should happen when that condition is met (then). |
| Condition | The part of an 'if-then' statement that describes a situation or requirement that must be true for the action to happen. |
| Action | The part of an 'if-then' statement that describes what happens when the condition is met. |
| Branch | A path or direction taken in a sequence of instructions or a story based on a decision or condition. |
Watch Out for These Misconceptions
Common MisconceptionComputers make their own choices.
What to Teach Instead
Students often think computers are 'thinking' for themselves. By creating their own 'if-then' rules, they learn that the computer is just following a path that a human designer created.
Common MisconceptionBranching is too hard for Year 1.
What to Teach Instead
While 'branching' sounds technical, children use it every day. Using familiar examples like 'if you are hungry, eat a snack' helps them see they are already experts at this logic.
Active Learning Ideas
See all activitiesSimulation Game: The Weather Path
Create two paths on the floor with masking tape. At a 'decision point', the teacher holds up a sun or a rain cloud. Students must choose the correct path based on the 'if-then' rule.
Inquiry Circle: Choice Stories
In small groups, students create a three-page story. On the second page, the character faces a choice (e.g., go left or right). They draw two different endings based on that choice.
Think-Pair-Share: Robot Decisions
Ask: 'If a robot is cleaning and sees a cat, what should it do?' Students think of a rule, share with a partner, and explain their 'if-then' logic.
Real-World Connections
- Traffic lights use 'if-then' logic. If the light is red, then stop. If the light is green, then go. This helps manage the flow of cars and pedestrians safely.
- Video games often use branching narratives. If the player chooses option A, then the story progresses down one path. If they choose option B, the story takes a different turn, leading to different challenges or endings.
- Automated customer service phone systems use branching. If you want to speak to sales, press 1. If you need technical support, press 2. This directs your call based on your stated need.
Assessment Ideas
Present students with a visual flowchart for a simple task, like making a sandwich. Ask them to point to the 'if' part and the 'then' part of a decision box. For example, 'If there is cheese, then add cheese to the sandwich.'
Give each student a card with a scenario, such as 'It is sunny outside.' Ask them to write one 'if-then' instruction for what they would do. Then, ask them to write one different 'if-then' instruction for the condition 'It is raining outside.'
Show students two different paths on a large floor grid or a story map. Ask: 'What choice do we need to make to go down the red path? What choice do we need to make to go down the blue path?' Guide them to use 'if-then' language to describe the choices.
Frequently Asked Questions
What is 'branching' in simple terms?
How does this connect to the Australian Curriculum?
How can active learning help students understand visual branching?
What are some 'unplugged' tools for teaching branching?
More in Thinking in Steps
What is an Algorithm?
Defining algorithms as a sequence of steps used to complete a task or solve a problem.
2 methodologies
Breaking Down Problems (Decomposition)
Practicing decomposition by taking a big task and splitting it into smaller, manageable parts.
2 methodologies
Sequencing Daily Routines
Students create algorithms for everyday routines, like getting ready for school or making breakfast.
2 methodologies
Pattern Recognition in Algorithms
Identifying repeating patterns within sequences of instructions to simplify algorithms.
2 methodologies
Algorithms for Games
Students analyze the steps involved in playing simple games and create their own game instructions.
2 methodologies