Skip to content
Computer Science · 5th Year

Active learning ideas

Conditionals and Selection

Conditionals and selection introduce decision-making to the world of coding. For 5th Year students, this is where their programs start to feel 'smart.' By using 'if-then' and 'if-then-else' blocks, students can create code that reacts to the environment, such as a character saying 'Ouch!' only when it hits a wall. This aligns with the NCCA's focus on logical reasoning and developing problem-solving strategies.

NCCA Curriculum SpecificationsNCCA Primary Mathematics: Computational ThinkingDLF: Learner Outcomes - Pupils use digital technologies to develop problem-solving strategies
15–35 minPairs → Whole Class3 activities

Activity 01

Simulation Game25 min · Whole Class

Simulation Game: The Human Sensor

One student is a 'robot' walking across the room. Other students act as 'sensors' who hold up 'If' cards (e.g., 'If you see a red chair, then sit down'). The robot must react only when the condition is met.

How do computers make decisions?
ApplyAnalyzeEvaluateCreateSocial AwarenessDecision-Making
Generate Complete Lesson

Activity 02

Inquiry Circle35 min · Small Groups

Inquiry Circle: Condition Quest

Groups are given a set of scenarios (e.g., a login screen, a temperature sensor). They must write the 'if-then-else' logic for each scenario on a whiteboard and present it to the class for feedback.

What is a conditional statement?
AnalyzeEvaluateCreateSelf-ManagementSelf-Awareness
Generate Complete Lesson

Activity 03

Think-Pair-Share15 min · Pairs

Think-Pair-Share: Real Life Ifs

Students think of three 'if-then' rules they follow at school (e.g., 'If the bell rings, then we go outside'). They share with a partner and try to add an 'else' to each one to make the rule more complete.

How can we use 'if-then' blocks to create a game?
UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit


Watch Out for These Misconceptions

  • The 'if' block only checks the condition once.

    In Scratch, students often forget that an 'if' block usually needs to be inside a 'forever' loop to keep checking the condition. Peer debugging helps them see why their 'if' statement didn't work when the game started.

  • You can only have one 'if' at a time.

    Pupils may not realize they can stack or nest conditionals. Hands-on logic puzzles help them see how complex decisions (like 'If it's Saturday AND it's sunny') are built from simple blocks.


Methods used in this brief