Skip to content
Computing · Year 1 · Programming with Floor Robots · Autumn Term

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').

National Curriculum Attainment TargetsKS1: Computing - ProgrammingKS1: Computing - Logical Reasoning

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

  1. What does the robot do when it senses something in its way?
  2. Can you make the robot take a different path when it reaches a wall?
  3. 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

Sequencing Commands

Why: Students need to understand how to give the robot a series of commands in order before they can introduce decision-making.

Basic Robot Movement

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

ConditionA specific situation or event that the robot checks for, like sensing an obstacle.
ActionWhat the robot does when the condition is met, such as turning or stopping.
If...then statementA programming instruction that tells the robot to perform an action only if a certain condition is true.
ObstacleSomething 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 activities

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

Quick Check

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.

Discussion Prompt

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.

Exit Ticket

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?
Bee-Bots or Blue-Bots are ideal due to simple sensors for obstacles and directional controls. They provide tactile buttons for 'if obstacle, then turn' programming without screens, suiting young learners. Pair with printed mats for custom paths to extend replay value across lessons.
How can active learning help students understand conditional logic?
Active approaches like robot obstacle courses give instant feedback on 'if...then' logic, turning predictions into observations. Children debug physically, collaborate on fixes, and explain reasoning to peers, which solidifies abstract concepts. This beats worksheets by building resilience through iterative testing and real-world relevance.
How to differentiate conditional logic activities for Year 1?
Provide pre-programmed cards for beginners to test predictions, while advanced students design multi-condition paths. Use larger obstacles for motor skill support and visual timers for focus. Extension: Add colour sensors for 'if red, then stop' to layer complexity without overwhelming.
How to assess understanding of if-then programming?
Observe during runs: note accurate predictions, successful debugging, and verbal explanations of conditions. Use photo evidence of paths and simple rubrics for 'predicted outcome', 'adjusted code', and 'explained why'. Self-assessment stickers for 'My robot decided correctly!' reinforce reflection.