Skip to content
Computer Science · 6th Year

Active learning ideas

Conditionals and Selection

Conditionals and selection introduce 'intelligence' into coding. By using 'if-then-else' statements, 6th Year students enable their programs to make decisions based on inputs. This topic aligns with the Logic and Reasoning strand of the NCCA Mathematics curriculum and is essential for creating interactive digital content. It teaches students that computer behavior is not random but based on specific, logical conditions.

NCCA Curriculum SpecificationsPrimary Mathematics Curriculum (2023) - Logic and ReasoningPrimary Curriculum Framework - Being a Digital Learner
15–40 minPairs → Whole Class3 activities

Activity 01

Role Play20 min · Whole Class

Role Play: The Logic Gatekeeper

One student stands at the door and acts as the 'Condition.' They have a rule (e.g., 'If you are wearing blue, then go to the left; else go to the right'). Classmates must follow the logic to find their seats.

How do computers make decisions?
ApplyAnalyzeEvaluateSocial AwarenessSelf-Awareness
Generate Complete Lesson

Activity 02

Inquiry Circle40 min · Small Groups

Inquiry Circle: Smart Home Design

Groups use paper 'blocks' to design the logic for a smart house. They must create conditionals for things like: 'If it is 7am, then play music' or 'If the alarm is triggered, then call the Gardaí.'

What is an 'if-then' statement?
AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 03

Think-Pair-Share15 min · Pairs

Think-Pair-Share: Game Rules

Students look at a popular game like 'Among Us' or 'Minecraft' and identify three 'If-Then' rules that make the game work. They share these with a partner and discuss what would happen if the 'Else' part was missing.

How can we make our games interactive?
UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit


Watch Out for These Misconceptions

  • The 'Else' part is always necessary.

    Students often think they must fill both parts of an if-then-else block. Use a simulation to show that sometimes we only want something to happen if a condition is met, and do nothing otherwise.

  • Computers can 'think' for themselves using conditionals.

    Explain that the computer is only following the rules the programmer wrote. Use peer teaching to show that if the programmer's logic is wrong, the computer will make the 'wrong' decision every time.


Methods used in this brief