Unplugged Lesson
Beginner
40 mins
Teacher led
+50 XP
What you need:
IWB/Projector/Large Screen

Making Decisions (If/Then)

In this lesson, you'll explore how to make decisions in coding using conditional statements. Follow step-by-step activities to understand if/then/else logic, visualise concepts with flowcharts, and apply rules in a fun 'Lunch Robot' group activity.

Teacher Class Feed

Load previous activity

    1 - Introduction

    Today, we're going to learn how to make decisions in code. Just like you make choices every day, a program needs to follow a set of rules to decide what to do. The key to this is if/then logic, where a program says, 'if this happens, then do that.'

    To explore this, we’ll become the Lunch Robot! We'll look at fun examples, draw flowcharts, and even act like a robot that decides what to serve for lunch based on a series of rules. Get ready to program your own decisions and make some exciting choices!

    2 - What's a Conditional?

    Start the lesson by asking your students if they've ever had to make a decision based on something else happening first. You can give a few simple, relatable examples to get them thinking, like:

    • "If it's sunny, then I can play outside."

    • "If the bus is late, then I'll walk to school."

    • "If I finish my homework, then I can watch TV."

    Explain that these are called conditional statements. The word conditional simply means that an action depends on a specific condition being true. In coding, we use conditional statements to give a computer a set of rules to follow. The most basic and important of these is the if... then... statement.

    3 - Visualising the Statement

    Before you introduce the full if/then/else structure, start with the most basic conditional to build a strong foundation. This simple model helps students understand that a program's path depends on whether a single condition is true.

    Display this flowchart on the board:

    Explain that this shows the most direct way a program makes a decision. It checks a condition, and if it's true, it follows one path. This naturally leads to the next big question for the class: "But what should the program do if it is raining?" This is the perfect moment to introduce the else path.

    4 - Adding a Plan B: The Else Statement

    Now, point out to your class that the last flowchart only gave instructions for one outcome. What if we want the computer to do something different if the condition is not true? This is where our code needs a "Plan B."

    In coding, when we want to give our robot an instruction for what to do if the condition is false, we use the word else. Think of it like a backup plan! The robot will always have an instruction, no matter what.

    Display this new flowchart on the board to show how the else feature gives our program a path for every possible situation.

    This is a complete conditional statement, and it ensures our robot will always have an instruction.


    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of 123Learn.ie 2017 - 2026. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more