Introduction to Conditional Logic
Students explore simple 'if...then' concepts by programming a robot to make a decision based on a condition (e.g., 'if obstacle, then turn').
About This Topic
Conditional logic introduces Year 1 students to simple 'if...then' statements through programming floor robots. Children program the robot to follow a path but change direction if it senses an obstacle, such as a box or wall. This builds on basic sequencing from earlier units and aligns with KS1 Computing standards for programming and logical reasoning. Students predict robot behaviour using key questions like 'What does the robot do when it senses something in its way?'
This topic fosters early computational thinking by distinguishing between fixed sequences and decisions based on conditions. It connects to mathematics through pattern recognition and to everyday problem-solving, as children relate robot choices to real-life decisions, like crossing a road only if safe. Teachers can use unplugged activities first to model conditions with arrows and symbols before transitioning to robots.
Active learning shines here because physical robots provide immediate feedback on code logic. Children test predictions, observe outcomes, and debug in real time, which makes abstract 'if...then' concepts concrete and engaging. Collaborative debugging in pairs reinforces persistence and peer explanation of reasoning.
Key Questions
- What does the robot do when it senses something in its way?
- Can you make the robot take a different path when it reaches a wall?
- What do you think the robot will do next if we put a box in front of it?
Learning Objectives
- Demonstrate how a floor robot navigates a path with an obstacle using an 'if...then' command.
- Identify the condition and the action in a given 'if...then' programming statement for a robot.
- Predict the robot's next movement based on a specific 'if...then' condition.
- Create a simple program for a floor robot that includes at least one 'if...then' decision.
Before You Start
Why: Students need to understand how to give the robot a series of commands in order before they can introduce decision-making.
Why: Students must be able to make the robot move forward, backward, and turn before they can program it to make decisions about its movement.
Key Vocabulary
| Condition | A specific situation or event that the robot checks for, like sensing an obstacle. |
| Action | What the robot does when the condition is met, such as turning or stopping. |
| If...then statement | A programming instruction that tells the robot to perform an action only if a certain condition is true. |
| Obstacle | Something in the robot's path that it needs to detect, like a wall or a box. |
Watch Out for These Misconceptions
Common MisconceptionThe robot always follows the exact same path no matter what.
What to Teach Instead
Conditions make paths change based on sensors. Hands-on testing with obstacles lets students see variations firsthand and revise programs, building understanding that inputs affect outputs through trial and peer observation.
Common MisconceptionIf the condition is not met, the robot stops completely.
What to Teach Instead
Unmet conditions lead to default actions like continuing straight. Robot runs with real obstacles help students predict and confirm else-clauses, while group discussions clarify full logic flows.
Common MisconceptionConditions work like magic without needing sensors.
What to Teach Instead
Sensors detect real-world inputs. Physical debugging activities reveal sensor roles, as children adjust mats and retry, fostering links between code, hardware, and environment.
Active Learning Ideas
See all activitiesStations Rotation: Robot Decision Paths
Set up three stations with mats marked for paths and obstacles. At each, pairs program their robot: if no obstacle, go straight; if obstacle, turn right. Rotate every 10 minutes and compare paths on a class chart. End with sharing one successful program.
Whole Class Prediction Challenge
Display a robot path on the floor with hidden obstacles. Students predict and vote on robot actions before running the program. Discuss matches between predictions and outcomes, then adjust code as a group.
Small Groups: Debug Relay
Groups create a conditional program with an intentional error. Pass the robot to the next group to test and fix. Record changes on mini-whiteboards and celebrate the final working path.
Individual: Personal Path Planner
Each child draws a path with two conditions, then programs their robot to follow it. Test individually, note what worked, and share one tip with a partner.
Real-World Connections
- Self-driving cars use 'if...then' logic constantly. For example, 'if' the car detects a pedestrian, 'then' it brakes immediately to ensure safety.
- Traffic lights operate on conditional logic. 'If' the sensor detects cars waiting on one side, 'then' the light changes to allow them to pass.
Assessment Ideas
Show students a simple program on a tablet or board: 'IF sensor sees box, THEN turn left'. Ask students to point to the 'condition' and the 'action'. Then, place a box in front of a real robot programmed with this code and ask them to predict what it will do.
Ask students: 'Imagine you are programming a robot to deliver a package. What is one 'if...then' rule you would give it to make sure it doesn't bump into anything?' Encourage them to name both the condition and the action.
Give each student a card with a picture of a robot facing a wall. Ask them to write one 'if...then' sentence that explains what the robot should do. For example, 'If the robot sees a wall, then it should turn around.'
Frequently Asked Questions
What floor robots work best for Year 1 conditional logic?
How can active learning help students understand conditional logic?
How to differentiate conditional logic activities for Year 1?
How to assess understanding of if-then programming?
More in Programming with Floor Robots
Bot Navigation Basics
Students learn the basic commands of forward, backward, left, and right to move a robot across a simple grid map.
2 methodologies
Route Planning with Obstacles
Students design a path for a robot to follow, avoiding obstacles and reaching a target on a more complex map.
2 methodologies
Robot Challenges and Debugging
Working in teams, students solve puzzles and navigate complex mazes using logical reasoning and debugging skills when their programs don't work as expected.
2 methodologies
Using Sensors (Simple Inputs)
Students explore how simple sensors (e.g., touch, light) can provide input to a robot and influence its behavior.
2 methodologies
Creating Robot Stories
Students program robots to act out simple stories or scenarios, integrating movement and perhaps sound to tell a narrative.
2 methodologies