Skip to content
Coding · 1st Year

Active learning ideas

Control Structures: Selection

Selection is how programs make decisions. Using 'if-then-else' logic, students can create programs that respond differently depending on the situation. This is a fundamental concept in NCCA Strand 3, allowing for interactivity and complexity in coding projects.

NCCA Curriculum SpecificationsNCCA Coding Strand 2: 2.8NCCA Coding Strand 3: 3.3
20–50 minPairs → Whole Class3 activities

Activity 01

Role Play30 min · Whole Class

Role Play: The Logic Gatekeeper

One student acts as a 'gatekeeper' with a set of rules (e.g., 'If you are wearing blue, go left; else, go right'). Other students approach, and the gatekeeper must direct them based on the 'if-then' logic.

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

Activity 02

Inquiry Circle50 min · Small Groups

Inquiry Circle: Choose Your Own Adventure

In small groups, students write a short 'Choose Your Own Adventure' story on cards. Each card must have a clear 'if' choice that leads to a different outcome. They swap stories and 'play' through the selection paths.

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

Activity 03

Think-Pair-Share20 min · Pairs

Think-Pair-Share: Real-World If-Then

Students identify three 'if-then' decisions they made this morning (e.g., 'If it's raining, I'll take the bus'). They share these with a partner and then try to write them in a 'coding' format.

How can selection change the flow of a programme?
UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit


Watch Out for These Misconceptions

  • The 'else' part is always required.

    Students often think every 'if' needs an 'else'. Using a simple 'If it's Tuesday, we have PE' example shows that sometimes, if the condition isn't met, the program just does nothing and moves on.

  • Computers can 'guess' what you mean if the condition is vague.

    Computers need exact conditions (e.g., 'Score > 10' not 'Score is high'). A 'literal robot' activity where students give vague instructions helps them see why precision in selection is vital.


Methods used in this brief