
Conditionals and Selection
Pupils introduce decision-making into their programmes using 'if-then' and 'if-then-else' statements. They create programmes that respond differently based on user input or events.
TL;DR: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.
About This Topic
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.
This topic is a bridge to more advanced computational thinking, as it requires students to think about multiple possible futures for their program. It encourages 'what-if' thinking, which is valuable in science, history, and social development. Students grasp this concept faster through structured discussion and peer explanation where they debate the 'conditions' required for everyday decisions.
Key Questions
- How do computers make decisions?
- What is a conditional statement?
- How can we use 'if-then' blocks to create a game?
Watch Out for These Misconceptions
Common MisconceptionThe 'if' block only checks the condition once.
What to Teach Instead
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.
Common MisconceptionYou can only have one 'if' at a time.
What to Teach Instead
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.
Active Learning Ideas
See all activities→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.
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.
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.
Frequently Asked Questions
What is the difference between 'if-then' and 'if-then-else'?
How do conditionals link to the SPHE curriculum?
What are 'Boolean' operators in conditionals?
How can active learning help students understand conditionals?
More in Programming and Coding Fundamentals
Introduction to Block-Based Coding
Pupils are introduced to block-based programming environments to create simple interactive projects. They learn to snap blocks together to form working scripts.
8 methodologies
Variables and Data
Pupils explore the concept of variables as containers for storing data that can change. They use variables to keep score or store user input in their programmes.
8 methodologies
Loops and Iteration
Pupils learn to use loops to repeat actions, making their code more efficient. They experiment with different types of loops, such as 'repeat' and 'forever'.
8 methodologies